IDLE Path doesn't include current dir after chdir

T

Tom McDavid

I'm trying to learn more Python and have come across a strange
behavior.
I have Python2.3 installed on a Win2K machine. If I start the python
command line, I can do the following:
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
## fibo is fibonacci example from tutorial.
Everything works fine. But with IDLE, I get the following:

Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information.

****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************

IDLE 1.0
Traceback (most recent call last):
File "<pyshell#5>", line 1, in -toplevel-
import fibo
ImportError: No module named fibo When I use a desktop shortcut that has my start directory as
d:\python rather than the default, I can import my modules and things
work reasonably. I get the same "can't find module" result from
wxPython's PyAlaMode shell.
I dug a little and found that sys.path in idle doesn't seem to contain
".", when I manually added it, import behaves itself in idle after
chdir, but I don't want to have to manually fix my path every time I
start up. Anyone have more insight or a fix?
Thanks,
Tom McDavid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top