IDLE hangs despite -n

Dear all,

I tried to make matplotlib work with IDLE on Windows. I have settled for the Enthough Python Edition and the latest matplotlib (both executables can be found in www.soton.ac.uk/~fangohr/download/python).

I have prepared the exercises on linux and am now trying to run them in
windows. This is where I realised that matplotlib doesn't work well with
IDLE.

More particularly, it is known that the default backend TkAgg doesn't work
with IDLE (see here http://matplotlib.sourceforge.net/backends.html#TkAgg)
but it appears to work with "IDLE -n" (as it says on that web page).

The problem I experience is this:

-start idle
-execute these commands:

   import pylab
   pylab.plot(range(10))
   pylab.show()

This produces a figure window which seems to work fine.

At this point when closing the figure window, I can't get the IDLE
prompt active again. (It seems that IDLE thinks the program and the figure
process are still running, and is waiting for control to return.)

This, in itself, is maybe not suprising. However, the idle -n switch
doesn't seem to solve the problem for me (see below).

The same problem is observed when I execute a program in the IDLE editor
(by pressing F5).

Maybe this is the problem:

I have tried to tell IDLE to start with the "-n" by modifying the properties for the
IDLE link in the start menu from

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw"

to

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" "-n"

but this doesn't seem to solve the problem: I get exactly the same
behaviour as described above. Am I doing the right thing?

Can anyone give me some advice?

Many thanks,

Hans

P.S. Funnily enough, there are two Windows machines with a very similar software setup, i.e. enthought python plus matplotlib, where the default TkAgg interface seems to work happily togethe with IDLE. Unfortunately, these are not the ones I am trying to get to work :expressionless:

···

-------------------------------------------------
Dr Hans Fangohr

Computational Engineering & Design Research Group
School of Engineering Sciences
University of Southampton
Southampton, SO17 1BJ
United Kingdom

Location: Building 25, Room 1027
phone : +44 (0) 23 8059 8345
fax : +44 (0) 23 8059 7082
email : fangohr@...469...
-------------------------------------------------

Hi Hans,

I just tried this out and found that setting "interactive" to "True" in
C:\python23\share\matplotlib\.matplotlibrc obviated the need to use the
show() command. The plot then comes up as soon as you issue the plot()
command. Multiple plotting-closing cycles worked fine in the same Idle
session.

Regards,
Todd

···

On Tue, 2005-01-11 at 14:29, Hans Fangohr wrote:

Dear all,

I tried to make matplotlib work with IDLE on Windows. I have settled for
the Enthough Python Edition and the latest matplotlib (both executables
can be found in www.soton.ac.uk/~fangohr/download/python).

I have prepared the exercises on linux and am now trying to run them in
windows. This is where I realised that matplotlib doesn't work well with
IDLE.

More particularly, it is known that the default backend TkAgg doesn't work
with IDLE (see here http://matplotlib.sourceforge.net/backends.html#TkAgg)
but it appears to work with "IDLE -n" (as it says on that web page).

The problem I experience is this:

-start idle
-execute these commands:

   import pylab
   pylab.plot(range(10))
   pylab.show()

This produces a figure window which seems to work fine.

At this point when closing the figure window, I can't get the IDLE
prompt active again. (It seems that IDLE thinks the program and the figure
process are still running, and is waiting for control to return.)

This, in itself, is maybe not suprising. However, the idle -n switch
doesn't seem to solve the problem for me (see below).

The same problem is observed when I execute a program in the IDLE editor
(by pressing F5).

Maybe this is the problem:

I have tried to tell IDLE to start with the "-n" by modifying the properties for the
IDLE link in the start menu from

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw"

to

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" "-n"

but this doesn't seem to solve the problem: I get exactly the same
behaviour as described above. Am I doing the right thing?

Can anyone give me some advice?

Many thanks,

Hans

P.S. Funnily enough, there are two Windows machines with a very similar
software setup, i.e. enthought python plus matplotlib, where the default
TkAgg interface seems to work happily togethe with IDLE. Unfortunately,
these are not the ones I am trying to get to work :expressionless:

-------------------------------------------------
Dr Hans Fangohr

Computational Engineering & Design Research Group
School of Engineering Sciences
University of Southampton
Southampton, SO17 1BJ
United Kingdom

Location: Building 25, Room 1027
phone : +44 (0) 23 8059 8345
fax : +44 (0) 23 8059 7082
email : fangohr@...469...
-------------------------------------------------

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--

Hi Todd,

thanks for the quick response.

I just tried this out and found that setting "interactive" to "True" in
C:\python23\share\matplotlib\.matplotlibrc obviated the need to use the
show() command. The plot then comes up as soon as you issue the plot()
command.

Hm. Done that. A figure window pops up immediately but is not being updated correctly: a part of the graph is visible, the other part of the figure (which was underneath another window initially) appears white. The titel of the figure says "Figure 1 (Not responding)".
IDLE, however, responds happily :wink: T

Multiple plotting-closing cycles worked fine in the same Idle
session.

Good -- so this works at your machine, not at mine. The strange thing is that I installed WinXP from scratch just a few days ago on that machine, so it should be a fairly 'clean' environment.

I take it there is no more recent version of matplotlib for windows (and Python 2.3) than 0.70.1?

Thanks,

Hans

···

Regards,
Todd

On Tue, 2005-01-11 at 14:29, Hans Fangohr wrote:

Dear all,

I tried to make matplotlib work with IDLE on Windows. I have settled for
the Enthough Python Edition and the latest matplotlib (both executables
can be found in www.soton.ac.uk/~fangohr/download/python).

I have prepared the exercises on linux and am now trying to run them in
windows. This is where I realised that matplotlib doesn't work well with
IDLE.

More particularly, it is known that the default backend TkAgg doesn't work
with IDLE (see here http://matplotlib.sourceforge.net/backends.html#TkAgg)
but it appears to work with "IDLE -n" (as it says on that web page).

The problem I experience is this:

-start idle
-execute these commands:

   import pylab
   pylab.plot(range(10))
   pylab.show()

This produces a figure window which seems to work fine.

At this point when closing the figure window, I can't get the IDLE
prompt active again. (It seems that IDLE thinks the program and the figure
process are still running, and is waiting for control to return.)

This, in itself, is maybe not suprising. However, the idle -n switch
doesn't seem to solve the problem for me (see below).

The same problem is observed when I execute a program in the IDLE editor
(by pressing F5).

Maybe this is the problem:

I have tried to tell IDLE to start with the "-n" by modifying the properties for the
IDLE link in the start menu from

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw"

to

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" "-n"

but this doesn't seem to solve the problem: I get exactly the same
behaviour as described above. Am I doing the right thing?

Can anyone give me some advice?

Many thanks,

Hans

P.S. Funnily enough, there are two Windows machines with a very similar
software setup, i.e. enthought python plus matplotlib, where the default
TkAgg interface seems to work happily togethe with IDLE. Unfortunately,
these are not the ones I am trying to get to work :expressionless:

-------------------------------------------------
Dr Hans Fangohr

Computational Engineering & Design Research Group
School of Engineering Sciences
University of Southampton
Southampton, SO17 1BJ
United Kingdom

Location: Building 25, Room 1027
phone : +44 (0) 23 8059 8345
fax : +44 (0) 23 8059 7082
email : fangohr@...469...
-------------------------------------------------

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

-------------------------------------------------
Dr Hans Fangohr

Computational Engineering & Design Research Group
School of Engineering Sciences
University of Southampton
Southampton, SO17 1BJ
United Kingdom

Location: Building 25, Room 1027
phone : +44 (0) 23 8059 8345
fax : +44 (0) 23 8059 7082
email : fangohr@...469...
-------------------------------------------------

Hi Todd,

thanks for the quick response.

> I just tried this out and found that setting "interactive" to "True" in
> C:\python23\share\matplotlib\.matplotlibrc obviated the need to use the
> show() command. The plot then comes up as soon as you issue the plot()
> command.
Hm. Done that. A figure window pops up immediately but is not being
updated correctly: a part of the graph is visible, the other part of the
figure (which was underneath another window initially) appears white. The
titel of the figure says "Figure 1 (Not responding)".
IDLE, however, responds happily :wink: T

> Multiple plotting-closing cycles worked fine in the same Idle
> session.
Good -- so this works at your machine, not at mine. The strange thing is
that I installed WinXP from scratch just a few days ago on that machine,
so it should be a fairly 'clean' environment.

I take it there is no more recent version of matplotlib for windows
(and Python 2.3) than 0.70.1?

No. Just to be clear: I set interactive to True, and used "idle -n"
from Python-2.3.4 and it worked fine for me on Windows 2000 Pro. Idle
should be reporting "No Subprocess" when it starts up.

Regards,
Todd

···

On Tue, 2005-01-11 at 16:17, Hans Fangohr wrote:

Thanks,

Hans

>
> Regards,
> Todd
>
> On Tue, 2005-01-11 at 14:29, Hans Fangohr wrote:
>> Dear all,
>>
>> I tried to make matplotlib work with IDLE on Windows. I have settled for
>> the Enthough Python Edition and the latest matplotlib (both executables
>> can be found in www.soton.ac.uk/~fangohr/download/python).
>>
>> I have prepared the exercises on linux and am now trying to run them in
>> windows. This is where I realised that matplotlib doesn't work well with
>> IDLE.
>>
>> More particularly, it is known that the default backend TkAgg doesn't work
>> with IDLE (see here http://matplotlib.sourceforge.net/backends.html#TkAgg)
>> but it appears to work with "IDLE -n" (as it says on that web page).
>>
>> The problem I experience is this:
>>
>> -start idle
>> -execute these commands:
>>
>> import pylab
>> pylab.plot(range(10))
>> pylab.show()
>>
>> This produces a figure window which seems to work fine.
>>
>> At this point when closing the figure window, I can't get the IDLE
>> prompt active again. (It seems that IDLE thinks the program and the figure
>> process are still running, and is waiting for control to return.)
>>
>> This, in itself, is maybe not suprising. However, the idle -n switch
>> doesn't seem to solve the problem for me (see below).
>>
>> The same problem is observed when I execute a program in the IDLE editor
>> (by pressing F5).
>>
>> Maybe this is the problem:
>>
>> I have tried to tell IDLE to start with the "-n" by modifying the properties for the
>> IDLE link in the start menu from
>>
>> C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw"
>>
>> to
>>
>> C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" "-n"
>>
>> but this doesn't seem to solve the problem: I get exactly the same
>> behaviour as described above. Am I doing the right thing?
>>
>> Can anyone give me some advice?
>>
>> Many thanks,
>>
>> Hans
>>
>>
>> P.S. Funnily enough, there are two Windows machines with a very similar
>> software setup, i.e. enthought python plus matplotlib, where the default
>> TkAgg interface seems to work happily togethe with IDLE. Unfortunately,
>> these are not the ones I am trying to get to work :expressionless:
>>
>>
>>
>>
>>
>> -------------------------------------------------
>> Dr Hans Fangohr
>>
>> Computational Engineering & Design Research Group
>> School of Engineering Sciences
>> University of Southampton
>> Southampton, SO17 1BJ
>> United Kingdom
>>
>> Location: Building 25, Room 1027
>> phone : +44 (0) 23 8059 8345
>> fax : +44 (0) 23 8059 7082
>> email : fangohr@...469...
>> -------------------------------------------------
>>
>>
>>
>> -------------------------------------------------------
>> The SF.Net email is sponsored by: Beat the post-holiday blues
>> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
>> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> matplotlib-users List Signup and Options
> --
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> matplotlib-users List Signup and Options
>

-------------------------------------------------
Dr Hans Fangohr

Computational Engineering & Design Research Group
School of Engineering Sciences
University of Southampton
Southampton, SO17 1BJ
United Kingdom

Location: Building 25, Room 1027
phone : +44 (0) 23 8059 8345
fax : +44 (0) 23 8059 7082
email : fangohr@...469...
-------------------------------------------------

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--