running IDLE from another program?

John Salerno johnjsal at NOSPAMgmail.com
Sat Apr 1 15:18:46 EST 2006


Kent Johnson wrote:

> I'm not sure what you mean by a 'debug' type environment. If you mean, 
> you want to run the program in a debugger and step through it, then this 
> approach won't work. If you just mean that you want to see the output of 
> the program, it will work.

No, just an environment like IDLE that shows errors instead of just 
killing the program.

> OK, your program is reading from standard input and the environment set 
> up by UltraEdit doesn't support this. If you are trying to run 
> interactive programs this approach won't work.

Oh, I see! I had the raw_input() in there so it would pause the DOS 
prompt for me, but after taking out that line, then it works how I want 
it to.

> One thing that is really useful about running in an editor window is 
> that (in TextPad, anyway) I can double-click on an error message and go 
> directly to the line with the error.

Interesting. The way I have it now, it shows errors the way I want to, 
but it shows them just in a text file, nothing special, and I don't seem 
to be able to double-click them. Is this just a feature of TextPad, or 
did you have to set it up so you can double-click the errors?

> Anyway, it turns out IDLE has a command-line switch that lets you pass a 
> file to run. Try
> C:\Python24\Lib\idlelib\idle -r C:\path\to\myprog.py

I tried this but it said it couldn't find idle.pyw (even though it is 
there).



More information about the Python-list mailing list