[Tutor] Idle
Andy W
toodles@yifan.net
Mon, 14 Jan 2002 17:57:12 +0800
Hi Paul,
>> (I have looked at the documentation for import and it talks about
sys.path, so maybe I could add directories to sys.path in Idle?
Yes, you could indeed. Just do this:
###
import sys
sys.path.append("C:\\source\\python\\")
###
And you should now be able to import dvtest.py.
Andy
----- Original Message -----
From: Paul Hartley
To: tutor@python.org
Sent: Monday, January 14, 2002 5:25 PM
Subject: [Tutor] Idle
I have just started to use Idle and have prited out the manual. Looking at
using the debugger it says type in the module called dvtest.py save it as a
file and then import it.
Now I did that but saved the file dvtest.py somewhere more convenient for my
source code, not in the python directories, now when I type import dvtest.py
it cannot find the module. It will not let me type in import
c:\source\python etc. so how do I get python (or idle) to look elsewhere for
the module?
Paul