On Sun, Nov 25, 2007 at 11:14:47PM -0800, Jeff Younker wrote:
> 
> > so when I run my script from the command line, the folder does seem  
> > to be added to Python's importable modules search path.  When I  
> > attempt to import my_module I get the error:
> >
> > ImportError: No module named my_module
> 
> Do your module directories have an __init__.py file
> in them?

Actually, you do not need an __init__.py file in directories that
are immediately in sys.path.  You *do* need that __init__.py file
in sub-directories (which you access via dot notation).  See:

    http://docs.python.org/ref/import.html  (and search for __init__)

Dave

-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to