[Tutor] How to use Python 2.6 with IDLE?

Dick Moores rdmoores at gmail.com
Tue Jul 28 00:19:49 CEST 2009


On Mon, Jul 27, 2009 at 14:32, Alan Gauld<alan.gauld at btinternet.com> wrote:
>
> "Dick Moores" <rdmoores at gmail.com> wrote
>
>>> So edit the Target field of the shortcut to say:
>>>
>>> E:\Python26\pythonw.exe E:\Programs\Ulipad37\ulipad.pyw
>>
>> No, I'd already tried that. Doesn't work. Nothing happens.
>
> OK, You could try changing pythonw.exe tyo python.exe to
> bring up a console and watch for errors there....

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!


>>> In other words explicitly specify both the interpreter and the file
>>> rather than
>>> relying on Windows file associations.
>>>
>>> And if that fails to work, the lasst resort is to write a batch file that
>>> calls
>>> the right file with the rigt interpreter and then create a shortcut to
>>> that!
>>
>> Any chance you could write that batch file for me?
>
> Look at the one used for IDLE in standard python - idle.bat.
>
> Just copy and edit it as suggested by someone earlier.

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:
e:
  cd \Python26\Lib\idlelib\
  ..\..\pythonw.exe idle.pyw %*

And I can't decipher it. What is the "..\..\"?

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

> Finally, never having used ulipad, is it the interpreter called by the
> editor
> that you are trying to change? Or the interpretor that runs the editor?

The latter, I believe.

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

Yes.

> Or just that it still uses the wrong version of Python?
>
> If it's the interpreter used by the editor to run programs that may be
> defined in ulipad's config details somewhere - either an ini file or
> in the registry.  In which case find it and edit it manually.
> Or it could be by ulipad reading it from the environment - in which
> case there won't be much you can do!

I think I'll wait until the developer, who is in China (Beijing, I
believe), wakes up and gets back to his computer. It's 6:19 am there
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.

Thanks very much Alan, and everybody! If I get this solved, I'll write back.

Dick


More information about the Tutor mailing list