On 26/04/13 11:53, Ethan Furman wrote:
--> from Color import * # doesn't work in a function, though :( Yeah, that would be nice. ;) A bit dangerous, though -- what if another module does the same thing, but its Color is different?
It needs to put foo.Color in sys.modules, where foo is the name of the defining module. Then you do from foo.Color import * The drawback being that you need to write the name of the module into the import statement. It's disappointing that the import syntax doesn't have a way of saying "this module". -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com