0
from gasp import *

begin_graphics()

Circle((200, 200), 60)
Line((100, 400), (580, 200))
Box((400, 350), 120, 100)

update_when('key_pressed')
end_graphics()
3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by DragonSlayerX
0

Sorry for no message above.
When I run this code in my IDE I get nothing. The program is running when I kill it but it doesn't show anything at all. I don't know what to do. Any help is appreciated.

0

Comment the Circle and Box lines and see if you get a line. Then figure out why only Line() works.

from gasp import *
 
begin_graphics()
     
#Circle((200, 200), 60)
Line((100, 400), (580, 200))
#Box((400, 350), 120, 100)
     
update_when('key_pressed')
end_graphics()
0

Well when I was doing it nothing was showing at all. But I'll try your method. Thanks!

0

'when running my IDE' -> usually bad idea to run tests (only) from IDE

Configure a text editor (like context) to launch real Python session or use command line to run the code, or insert at end input statement and double click the file (usually graphics stuff enters in mainloop and does not disappear so quickly anyway).

0

Oh, thanks for your help guys. Yeah I tried running through gedit and terminal and it worked. Appreciate the help!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.