Try this.
myDic = {'config_type': u'high', 'config_path': u'C:\somePath'}
def foo(config_type='high', config_path='C:\somePath'):
print(config_type, config_path)
foo(**myDic)
# Result: (u'high', u'C:\\somePath')
def foo(**kwargs):
print(kwargs)
foo(**myDic)
# Result: {'config_type': u'high', 'config_path': u'C:\\somePath'}
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/30e22783-2e38-404e-8243-50a8d8126be2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I want to create a function that will execute the following the dictionary items as parameters
def foo('config_type'= 'high', 'config_path': 'C:\somePath')