Skip to navigation
How to assembling together python classes, models and functions from a list
01.07.16
work =[ ['av0_style','promotion_styles_to_be_removed',''], ['av0_style','style_type_A_without_min_order_qty',''], ['av0_style','set_nosales_nominmax_to_clearance','3'], ] app = Controller(None) for i in work: print('Task: \t%s' % (i)) try: modelX = getattr(app,i[0]) functionX = getattr(modelX,i[1]) if(i[2] == ''): functionX() else: functionX(i[2]) except Exception as e: app._send_error(e,i)
http://effbot.org/zone/python-getattr.htm
Reply
Anonymous
Information Epoch 1732620941
Build a prototype as soon as possible.
Home
Notebook
Contact us