From: C A. R. <an...@ex...> - 2010-10-10 22:20:01
|
On Sun, Oct 10, 2010 at 2:51 PM, Bruce Sherwood <bas...@nc...> wrote: > On Sat, Oct 9, 2010 at 10:11 PM, Bruce Sherwood <bas...@nc...> wrote: >> In the "For developers" section of vpython.org is a zip file >> containing experimental code for doing either the convenient "from >> visual import *" or a clean "import vpython". Please try this out and >> post comments about whether this would meet your needs, or how it >> should be changed, or offer a different scheme entirely. Once we reach >> agreement, this will become a part of VPython 5.4 for Python 2.7 and >> Python 3.1. Perfect, will take a look. >> I was able to follow the suggestion to put almost everything in the >> new vpython folder, so that the visual folder mostly just imports from >> the vpython folder. I thought it might be possible, and clean, to put >> the two modules inside one folder, but that doesn't work. I'm very >> hazy on how the import search works. If you see a way to have one >> folder rather than two, please explain. I personally think two folders/modules is desirable. The only way I think there should be one, is if the "visual" namespace can be used for the pythonic module, and something else (ie. visual.physics, etc.) used for the wildcard module ;-) >> As far as I can tell from my tests, there is complete backward >> compatibility with existing programs. >> >> Bruce Sherwood > > A colleague correctly points out that "vpython" isn't an appropriate > name for the other module, because of confusion with the cover term > (VPython = Visual+Python). I don't understand what you mean here, what's the issue exactly? > A better name might be for example > visual_parts; This particular name makes the proper module seem more like a second class citizen. IMO, the clean module _is_ vpython... the "visual" module is not. > note that whatever the name is, presumably it will get > imported with a short name (much as the scipy world settled on import > numpy as np). You're invited to suggest a better name. I might be alone here, but I rarely use a different name for imports, unless there will be conflict, but i like everything to be explicit... I don't like to have to look it up when i read the code later. But if vpython really cannot work, I still like either visualpy, visuallib, or maybe even pyvisual/visualpy. C Anthony |