From: Craig S. <cra...@ma...> - 2010-10-11 14:31:36
|
I don't like visual_parts at all. Too long and is unlike just about every other Python module out there. If vpython is off the table, I'd prefer the names in the order of 1) vispy, 2) visualpy, 3) vislib, 4) visuallib, 5) libvis, 6) libvisual. The other discussions over the weekend seemed to converge to a good solution: a clean implementation in the newly named space, and a visual module that imports from the clean implementation to avoid code duplication. It's unfortunate a visual.py solution can't be made to work, but visual/__init.py__ isn't too bad. Craig On Oct 10, 2010, at 2:51 PM, Bruce Sherwood wrote: > 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). A better name might be for example > visual_parts; 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. > > Bruce Sherwood > > 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. >> >> 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. >> >> As far as I can tell from my tests, there is complete backward >> compatibility with existing programs. >> >> Bruce Sherwood >> >> ----------------------------------------------------------------------------- >> >> Here are the installation instructions in the accompanying README file: >> >> 1) Before making any changes to your current site-packages, make a copy of >> >> site-packages/visual >> >> 2) Replace site-packages/visual with the visual folder in this package. >> >> 3) Add to site-packages the vpython folder in this package. >> >> 4) From your saved copy of site-packages/visual, copy into the new >> vpython folder >> >> cvisual.pyd (Windows) or >> cvisual.so (Mac) >> >> 5) On Windows, from your saved copy of site-packages/visual, copy the doc and >> examples folders into the new visual folder. >> >> After making these changes, you can still use "from visual import *" if that is >> convenient, but if you want to import the visual objects cleanly, import them >> from the new vpython module. Here are two simple examples: >> >> import vpython as vp >> vp.box(color=vp.color.orange, material=vp.materials.wood) >> >> from vpython import (box, color, materials) >> box(color=color.orange, material=materials.wood) >> >> There are new clean modules vpython.controls, vpython.filedialog, and >> vpython.graph >> that can be used instead of the old modules visual.controls, >> visual.filedialog, and >> visual.graph. The old modules execute "from visual import *" and are >> retained because >> some programs expect that behavior when importing one of these modules. >> > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users -- Craig A. Struble, Ph.D. | Marquette University Associate Professor of Computer Science | 369 Cudahy Hall (414)288-3783 | (414)288-5472 (fax) http://www.mscs.mu.edu/~cstruble | cra...@ma... |