import newer

eryksun () eryksun at gmail.com
Sun Mar 20 03:45:10 EDT 2011


On Sunday, March 20, 2011 12:27:38 AM UTC-4, xinyou yan wrote:
> I begin to study with  <<learning python>>
> 
> I met a problem with import.
> 
> first
> I creat a  file  hello.py
> 
> then in fedora /14
> I type python to  the interpreter
> 
> >>> import hello
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named hello
> 
> What should i do now.
> The  current path is not  added  defaultly ?

>>> import os
>>> os.listdir(os.getcwd())

Is hello.py in the returned list?



More information about the Python-list mailing list