Python Forum
Program to move a dot towards a circle center
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program to move a dot towards a circle center
#8
(Dec-01-2021, 05:38 AM)deanhystad Wrote: Is your code like this?
    time.Clock ().tick (100)
    display.update ()
    print("I am here")
Or like this?
    time.Clock ().tick (100)
    display.update ()
print("I am here")
If the latter you aren't reaching the print statement because you are still in the while True: loop.
Thanks.

I have tried both. Former one will print as many times as it cycles through the loop. I dont want that.

I want to exit from the moving dot program and do something else. But using the latter format, it just does not print the "I am here".

Somehow I need to exit from pygame, I think, to continue to do the rest.
Reply


Messages In This Thread
RE: Program to move a dot towards a circle center - by plumberpy - Dec-01-2021, 08:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to plot seaborn heatmap on top of a background circle SriRajesh 0 1,449 Jul-09-2022, 04:00 AM
Last Post: SriRajesh
  (OpenCV) Help to improve code for object detection and finding center of it saoko 0 1,221 May-14-2022, 05:34 PM
Last Post: saoko
  [S0LVED] [Tkinter] Center dialog? Winfried 8 4,293 Mar-01-2022, 07:17 PM
Last Post: Winfried
  drawing moving circle on line with python barrai 1 3,185 Feb-25-2022, 03:33 PM
Last Post: BashBedlam
  Draw circle from GPS coords, and get GPX file? Winfried 0 2,204 Mar-29-2021, 07:19 PM
Last Post: Winfried
  Center align Kristenl2784 1 1,990 Aug-03-2020, 04:25 PM
Last Post: bowlofred
  Pyplot and circle Reldaing 0 1,507 Apr-01-2020, 10:44 AM
Last Post: Reldaing
  calculate circle sector Bloody_geek 2 2,324 Sep-11-2019, 08:54 PM
Last Post: Larz60+
  How can I move in an external program via Python? Pythoner 0 2,291 Dec-29-2018, 12:43 PM
Last Post: Pythoner
  Help with circle and motion wigigx 4 4,093 Aug-29-2017, 09:49 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020