From: Bruce S. <bas...@nc...> - 2010-10-08 15:38:25
|
No, please understand that for novice/casual use one could still use "from visual import *". What this proposal addresses is the need of expert users to be able to keep their namespaces clean, in situations where Visual is just one component of many. In those situations people WANT the specificity of saying vis.sphere (or vp.sphere, or whatever abbreviation they want to specify, or whatever abbreviation we as a community may wish to encourage). So the question remains, does my proposal give the experts what they need (without removing the simple scheme that some of us need)? Bruce Sherwood On Fri, Oct 8, 2010 at 4:50 AM, Lenore Horner <lh...@si...> wrote: > Well it looks like it keeps the one-line start, but at the cost of making most commands two or three letters longer. Maybe that's inevitable, but it not only makes more typing for everything, it makes all the lines of code longer and therefore harder to read. > > Lenore Horner > > > On Oct 8, 2010, at 12:39 AM, Bruce Sherwood wrote: > >> Here's another possibility for the contents of a file in the visual >> folder, perhaps called libvisual as has been suggested: >> >> ---------------------------------------------------- >> from . import cvisual >> from .cvisual import (vector, mag, mag2, norm, cross, rotate, >> comp, proj, diff_angle, rate, waitclose) >> from .primitives import (arrow, cylinder, cone, sphere, box, ring, label, >> frame, pyramid, ellipsoid, curve, >> faces, convex, helix, >> points, text, distant_light, local_light) >> from . ui import display >> from . import crayola >> color = crayola >> from . import materials >> from . import site_settings >> ---------------------------------------------------- >> >> Then a program would look like this: >> >> import visual.libvisual as vis >> vis.display(width=600, height=600, background=vis.color.white) >> vis.box(color=vis.color.orange, material=vis.materials.wood) >> v = vis.vector(1,2,3) >> .... >> >> Does this meet the requirements? >> >> Bruce Sherwood |