[Tutor] basic IDLE and other difficulties
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 25 Feb 2000 10:41:36 -0000
> --> just how do I make IDLE take the same thing for the "current"
> (or desired current) directory as I do? (I don't want to have to
> keep putting things in the midst of ...Python/Lib)
Look at the PYTHONPATH environme t variable
- set it up in your AUTOEXEC.BAT file to point to
the directory(s) where you store your own modules
then reboot.
From then on Python will look first in iyts own libraries
then in yours for a module. I think that's really what you want?
> --> how do I make IDLE acknowledge that I have *changed* a file
> in my favorite editor (or even in the IDLE builtin editor) after
> the first "from myfile import ..." ? IDLE seem just barely
> too stubborn to see my changes. Keep quitting and restarting??
Try issueing a 'reload'. I'm not sure if/where it is in IDLE
but theres definitely a menu version on Pythonwin.
BUT It only works if you used
import foo
not if you did
from foo import *
In the latter case you will have to quit/restart.
(unless somebody else knows a better way???)
FWIW I usually run IDLE as a development environment
but keep a DOS box open to run the programs - IDLE has
some bugs around raw_input() and input() and a few
other issues. Thus I use Ctrl-S to sabe then run the
program in the DOS box: F3 <Return>
> Sorry I'm not posting these questions to comp.lang.python.
Thats OK this forum is for exactly these types of questions.
Alan G.