Trouble importing modules in IDLE (Win32)

boblatest at googlemail.com boblatest at googlemail.com
Mon Aug 25 04:06:29 EDT 2008


On Aug 22, 10:43 pm, Terry Reedy <tjre... at udel.edu> wrote:
> Diez B. Roggisch wrote:

> By shell, he means the IDLE shell.  But this is the direction to look
> first.  In the IDLE shell (3.0) those two lines give me the Python
> directory, the same as the command line interpreter.  When in a file
> that is *not* in that directory, ditto.
>
> Bob, if you run a file that consists of the one statement 'import odbc',
> what happens.  If that works, then something in your script (or
> something it calls) is fiddling with sys.path or something.  Try to find
> a *minimal* file that exhibits the problem.
>
> tjr

Hello Dietz,

1. The output of "print sys.prefix" is the same in both shells (see my
other posting).
2. The minimal file that exhibits the problem (in IDLE but not in
PythonWin) is one that consists of the single line "import odbc".

Thanks,
robert



More information about the Python-list mailing list