| View previous topic :: View next topic |
| Author |
Message |
LGLudd
Joined: Sat Oct 15, 2011 11:50 am Posts: 8
|
Posted: Sat Oct 15, 2011 12:00 pm Post subject: IDLE and gtk windows |
|
|
I am attempting to follow the python tutorials but have a rather odd issue. all the code works if I run python from the command line but if I use IDLE then the only commands that appear to work are those that return their results to the IDLE shell. I cannot display any gtk windows (although no errors are returned) the music player will work (in so far as music starts playing as desired)
I think that this may be either a setup or security problem (I am running Fedora 14) but cannot work out what the problem is
Any assistance would be greatly appreciated.
Thanks
Leo |
|
| Back to top |
|
 |
LGLudd
Joined: Sat Oct 15, 2011 11:50 am Posts: 8
|
Posted: Mon Oct 17, 2011 3:55 pm Post subject: |
|
|
OK so I worked out part of what is happening but am not sure how to fix it.
The window is being displayed but not shown on the screen I can get the window (but not the content) to display by using IDLEs shell window and typing which tells me it is at 0,0.
I can get the window to display by adding the get_position method call to the end of my script but this feels wrong and still does not diplay the content.
What I do not understand is firstly why I do not see it initially and secondly how to fix it.
Any ideas?
Thanks
Leo |
|
| Back to top |
|
 |
evilnick Moderator

Joined: Mon Apr 04, 2005 12:47 pm Posts: 151 Location: LXF towers
|
Posted: Mon Oct 17, 2011 4:56 pm Post subject: |
|
|
I think the 'problem' is with the way gtk works. If you want to run interactively with the shell, it's fine for almost all things. If you try to execute the code (the interactive listings anyhow) then the main gtk loop has to be invoked for some things to happen.
if you add
to the end of the things that don't appear to work, do they work? |
|
| Back to top |
|
 |
LGLudd
Joined: Sat Oct 15, 2011 11:50 am Posts: 8
|
Posted: Mon Oct 17, 2011 6:51 pm Post subject: |
|
|
Yes that works perfectly, thanks Nick.
I was getting really frustrated by this.
Leo |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|