[Tutor] Can't find modules at command line

Sam Stout samusjack at yahoo.com
Mon Nov 2 06:37:49 CET 2009


I'm using Python on Mac OS X.  I usually run IDLE and get this result:

IDLE 1.2      
>>> import gun
Bang!
>>> 

However, when I try this from Terminal:

Jacks-Mac:~ Sam$ python
ActivePython 2.5.0.0 (ActiveState Software Inc.) based on
Python 2.5 (r25:51908, Mar  9 2007, 17:40:37) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gun
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named gun
>>> 

This file is at [/Users/sam/Documents/gun.py].  What should I do to make it visible to Python?


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091101/70c1d763/attachment.htm>


More information about the Tutor mailing list