thecocce / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Python and PyGame (how do I check variable values with PyScripter + PyGame) #442

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I posted a problem earlier about PyGame and that it crashes PyScripter. I was 
told to reinitialize which works. However, if I do so I can't check the values 
of the variables using the IDE. Is there a way to do this after you've 
reinitialized Python (to prevent PyGame from crashing PyScripter)?

Thanks.

Original issue reported on code.google.com by ast13...@gmail.com on 16 Nov 2010 at 5:15

GoogleCodeExporter commented 9 years ago
I suppose you want to check variable values during or after execution not 
before.  The engine is reinitialized before you run your PyGame script.  After 
your script completes you can view values using the Variable Window or the 
Interpreter.

Or else use the debugger with breakpoints to see variable values during 
execution.  

Original comment by pyscripter on 16 Nov 2010 at 5:21

GoogleCodeExporter commented 9 years ago
To close the PyGame window I have to reinitialize Python, so it reinitializes 
twice I guess. When I do that, I can't check the variables.

Original comment by ast13...@gmail.com on 16 Nov 2010 at 5:49

GoogleCodeExporter commented 9 years ago
What prevents you from checking the values before you close it?

Original comment by pyscripter on 16 Nov 2010 at 6:10

GoogleCodeExporter commented 9 years ago
If you mean what happens when I have it up and try to check a variable, then 
nothing. I can't even do a simple 1+1, nothing shows up (and Windows 7 plays a 
sound). If I try to close the game window it starts to lag and eventually 
PyScripter is not responding unless I don't reinitialize.  

Original comment by ast13...@gmail.com on 16 Nov 2010 at 7:09

GoogleCodeExporter commented 9 years ago
Can you post here a sample script so that I can have a look?

Original comment by pyscripter on 16 Nov 2010 at 8:10

GoogleCodeExporter commented 9 years ago
I tested it out with a very simple PyGame script (import pygame

hello = "hi"
pygame.init()
screen = pygame.display.set_mode((468, 60)) ) and then I can see what hello is. 
It prints it successfully. So it seems that it's not something wrong with 
PyScripter itself I assume.

http://www.megaupload.com/?d=FFAXS5R6 there is my files atm, just run main.py. 

Original comment by ast13...@gmail.com on 16 Nov 2010 at 8:33

GoogleCodeExporter commented 9 years ago
Any idea (sorry if I'm pushy)?

Original comment by ast13...@gmail.com on 20 Nov 2010 at 6:05

GoogleCodeExporter commented 9 years ago
I fixed it now, there was something with my code (when you quit it didn't not 
quit well enough) that messed it up. So there's nothing wrong with PyScripter. 
You may close this.

Original comment by ast13...@gmail.com on 21 Nov 2010 at 2:05

GoogleCodeExporter commented 9 years ago

Original comment by pyscripter on 22 Nov 2010 at 8:15