Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't import * from python modules #207
Migrated issue, originally created by Anonymous
<%namespace module="myapp.blah" import="*"/>
seems to do dir(myapp.blah), which picks up everything in that module (variables, imported modules), not just functions. It then dies on "util.partial(callable_, ...)" because callable_ isn't callable.
I've hackily fixed it myself in runtime.py:610, not sure if this is a good fix or not:
I also tried getting it to look at module.all rather than dir(), but that didn't import anything at all for some reason.
having a good fix upstream would be appreciated :)
Michael Bayer (@zzzeek) wrote:
Well doing dir() is pretty much what one would expect from importing "", unless there's an
For anyone reading who can't modify their current install - Another workaround is to prefix everything that isn't a function with an underscore, like