From: C A. R. <an...@ex...> - 2010-10-09 15:52:16
|
On Fri, Oct 8, 2010 at 10:09 PM, Guy K. Kloss <g....@ma...> wrote: > On Sat, 09 Oct 2010 16:05:22 C Anthony Risinger wrote: >> So, it may have to remain a package for compatibility, but that >> doesn't mean it needs to implement anything significant; it can still >> import what it needs from "vpython". > > It could be an empty package, that only contains a __init__.py, which does all > the import magic. That's what I meant :-) I was trying to see if it was possible to do it with only a file, visual.py like pylab, but I just don't think that will work. __init__.py can append a finder to sys.meta_path, which will then be used to properly build the namespace/"virtual" package contents. Some brief tests looked fine, but I'll try to make something more concrete later today. C Anthony |