Can't add modules?

Serg jerry at sky.net.ua
Thu Nov 15 23:43:20 EST 2001


I'm quite a newbie with setting python.
I've downloaded sources, compiled for win32 platform and first thing I wanted to do is to add some library and test its work.
The problem is: pythonpath is set for d:\python\lib; in that directory there is directory Optic. In it __init__.py and options.py.
Ok I write thimple python program

from optik import otion # or it was from optik import *
option(100)

I get
Traceback (most recent call last):
  File "a.py", line 1, in ?
    from optik import *
ImportError: No module named optik


At the same time I create in the same lib directory my directory b and in it file bb.py
def aa(some):
    print some

I start the following program

from optik import *
aa(100)

And it prints 100.

What did I do wrong?
>>> import sys
>>> sys.path
['', 'D:\\', 'd:\\python\\lib', 'D:\\PYTHON\\lib\\lib-tk', 'D:\\PYTHON']

python 2.2b1
--
Keep in touch. Your partner Maltsev.







More information about the Python-list mailing list