Re: Dynamic Import with sub module

2015-05-23 Thread Douglas Garstang
Replying to my own message. I just realised that even the case I thought would work, will not. :( If I have: import slice_fablib_common.common as common I end up with fabric showing me these commands: Available commands: common.chef.report common.chef.run Run the chef client.

Dynamic Import with sub module

2015-05-23 Thread Douglas Garstang
All, Can someone tell me how the following statement: import slice_fablib_common.common as common would be replicated with __import__ or import_module? I'm using fabric and I want the module when imported to appear in the namespace (which fabric shows as a task), in this case, as 'common.chef'.