Sorry, everyone, I accidentally replied to a few e-mails off-list because I'm using the Gmail web interface, and I forgot that reply-all is not default (I normally use thunderbird. Yay Google for giving POP3 access to mail. Boo Yahoo for charging for it.)
---------- Forwarded message ---------- From: Luke Paireepinart <[EMAIL PROTECTED]> Date: Dec 26, 2006 12:52 AM Subject: Re: [Tutor] RandomArray and numeric To: "linda. s" <[EMAIL PROTECTED]> On 12/25/06, linda.s <[EMAIL PROTECTED]> wrote:
Since RandomArray is with Numeric, why I saw a code has something like: from Numeric import * from RandomArray import *
Just because a package contains different functions does not mean they're added as sub-modules or sub-packages or wahtever the correct term is. For example, in the Python Imaging Library, you do import Image import ImageGrab etc. not import PIL.Image. Think of packages like a directory structure. lib -site-packages --Image --ImageGrab etc. whereas Pygame would be lib -site-packages --pygame ---display ---joystick ---draw etc. I'm pretty sure this is how it works. packages are just a directory tree with a collection of .py scripts (plus a special __init__.py in each directory, I believe.) HTH, -Luke
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
