Christer Enfors wrote:
> I have two files, in the same directory: main.py, and user.py
> 
> This works without problems.
> 
> But then I tried moving user.py to a subdirectory, and adding that 
> directory to Python's module search path

> But now I get an error message for the last line shown above:
> 
>    ----start----
>    Traceback (most recent call last):
>      File "./main.py", line 56, in ?
>        driver.boot()
>      File "./main.py", line 34, in boot
>        user_man = user.UserMan()
>    AttributeError: 'module' object has no attribute 'UserMan'
>    -----end-----
> 
> What's up with this?

There is a library module called 'user'. Since you appended to sys.path 
your program is finding the library module instead of your own.

Best solution is to rename your module to something else.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to