From: Tony R. <To...@br...> - 2009-10-22 02:20:49
|
You could maybe use the __all__ list in init to somehow trigger a full import, maybe a dummy submodule... A way to transparently detect an "import visual" from an "from visual import *" seems the ideal case but I'm not sure if it could easily be imemented that way. Although there seems to be alot of namespace correction code in the visual package that could possibly be moved to a dummy submodule that is only triggered when someone uses the * syntax On Oct 21, 2009, at 9:15 PM, "Guy K. Kloss" <g....@ma...> wrote: > On Thu, 22 Oct 2009 14:47:09 Bruce Sherwood wrote: >> Here's an idea about how to unpollute in a way that wouldn't break >> existing programs. Suppose one said "from visual2 import *" to get >> just >> the visual objects? > > Hmmm, to have a "shadow package" that is unpolluted. Might be an > idea. Make it > API identical ... > > Another option to have a "vidual_" package that actually implements > all the > stuff, and then have a "visual" package (for backward compatibility) > that > imports "from visual_ import *" as well as does the other wild > imports from > NumPy and math. > > That might do the trick ... while trying to keep the implementation > as clean > as possible. > > Guy > > -- > Guy K. Kloss > Institute of Information and Mathematical Sciences > Te Kura Putaiao o Mohiohio me Pangarau > Massey University, Albany (North Shore City, Auckland) > 473 State Highway 17, Gate 1, Mailroom, Quad B Building > voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 > G....@ma... http://www.massey.ac.nz/~gkloss > > --- > --- > --- > --------------------------------------------------------------------- > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users Tony Risinger Application Development Specialist Tel: 507-535-7563 | Fax: 507-292-5747 | Toll Free: 866-241-0639 To...@Br... http://www.brokerbin.com/ CONFIDENTIAL INFORMATION: This electronic mail message and any attached files contain information intended for the exclusive use of the specific individual(s) or entity(s) to whom it is addressed and may contain information that is propriety, privileged or confidential or otherwise exempt from disclosure. If you are not the intended recipient, please notify the sender immediately, by reply electronic mail or by telephone, of any unintended recipients so we may correct our records. Also, delete the original electronic mail and any attachments without making any copies of the electronic mail message or attachments. |