From: Guy K. K. <g....@ma...> - 2010-10-08 20:59:15
|
On Fri, 08 Oct 2010 17:39:59 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 > ---------------------------------------------------- Why all these funky relative imports ("from . import foo")? It should be much cleaner to just say "import foo"! Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9266 fax: +64 9 441-8181 G....@ma... http://www.massey.ac.nz/~gkloss |