[Tutor] How to use Python 2.6 with IDLE?

ALAN GAULD alan.gauld at btinternet.com
Tue Jul 28 01:40:34 CEST 2009



> I get a console for a fraction of a second. Can't read anything it says.
> 
> > Or just try typing the command into a console session till
> > you get one that works!
> 


So what happens when you run the same command from a console?
That should leave the errors visible.

> I'm not sure how to edit it. What's required for Ulipad is quite
> different, I believe.


It shouldn't be, it just calls the interpreter with the pyw file to launch 
the editor and passes along any other command line arguments 
given to the bat file.

> This is what I got from Dave Angel:
> e:
>   cd \Python26\Lib\idlelib\
>   ..\..\pythonw.exe idle.pyw %*
> 
> And I can't decipher it. What is the "..\..\"?


.. means the folder one level up,
so ..\..\pythonw.exe means backup two levelsand call pythonw.exe there

> I would like to learn how to write simple batch files, however, quite
> aside from writing one to solve my Ulipad problem.


It is a useful skill.

> > that you are trying to change? Or the interpretor that runs the editor?
> 
> The latter, I believe.


OK, thats what I initially thought, but then wondered...

> > When you say "nothing happens" do you mean the editor doesn't start?
> 
> Yes.


I'd definitely try running from a command prompt.

> I think I'll wait until the developer, who is in China (Beijing, I
> believe), wakes up and gets back to his computer. 

That might be best :-)

> now. If I understood him correctly, the version of Python Ulipad's
> shell uses should be the same as the version of Python it uses to run
> scripts inside Ulipad. But in my case, the shell runs 2.51; 2.62 runs
> my scripts.


Now I'm confused again. What do you mean by the shell?
Does Ulipad have a shell window like IDLE? If so it is almost certainly 
using the same interpreter as is running the editor itself (because the 
shell is probavbly using exec() ) The version of Python used to run 
your scripts could be anything however.


Alan G.


More information about the Tutor mailing list