[Tutor] How to use Python 2.6 with IDLE?
davea at ieee.org
Tue Jul 28 11:20:23 CEST 2009
Dick Moores wrote:
> I'm not sure how to edit it. What's required for Ulipad is quite
> different, I believe.
> This is what I got from Dave Angel:
> cd \Python26\Lib\idlelib\
> ..\..\pythonw.exe idle.pyw %*
> And I can't decipher it. What is the "..\..\"?
Just ask. The double-dots are the standard way of indicating "the
directory above the previous one." That's useful knowledge not only
within batch files but also within shortcuts and within Python programs.
The batch file starts by changing to the E: drive. Then it changes to
the explicit directory \Python26\Lib\idlelib, and because of the leading
slash, that refers to an absolute directory, irrespective of what the
current directory happened to be earlier. The 3rd line means that we
want to run a program pythonw.exe, located two directories up from the
current one, *without changing" the current directory. It could have
e:\Python26\pythonw.exe idle.pyw %*
but then if you ever changed to a different version, or installed on a
different drive or directory, you'd have two places in the batch file to
change. I like using relative directories where possible.
Finally, the %* at the end means copy whatever other parameters were
passed to the batch file, as additional parameters to the program.
> I would like to learn how to write simple batch files, however, quite
> aside from writing one to solve my Ulipad problem.
More information about the Tutor