Pythong circle mover Programming Software Development by peter1121 I need to know how to do the this assignment. moveTo(shape, newCenter) shape is a graphics object that supports the getCenter method and the newCenter is a Point. Moves shape so that newCenter is its center. Use your function to write a program that draws a circle and then allows the user to click the window 10 times. Each time the user … Re: Pythong circle mover Programming Software Development by Stefano Mtangoo I think you need to go for Vpython, [url]www.vpython.org[/url] . Myself I have not learned it but I tried veeery little here is a code i took from examples directory of Vpy [CODE=python]from visual import * dt = 0.1 g = [] for i in range(3): g.append(display(y = 30 + 200*i, width=600, height=170)) g[0].title="k=6N/m mass=2.0kg&… Re: Pythong circle mover Programming Software Development by bumsfeld Your Python installation usually includes the Tkinter GUI toolkit. Tkinter can do the things you want to do. Re: Pythong circle mover Programming Software Development by Ene Uran Yes, you can use Tkinter. Here is a hopefully helpful explanation how Tkinter draws circles that follow a mouse click. The basics are there, you just have to apply them to your problem: [code=python]# draw a circle with given center (x,y) and radius at mouse click point import Tkinter as tk def draw_circle(event): ''' draw a … Pythong and GCC version compatibility Programming Software Development by begueradj Hello How can we know which GCC version is compatiable with a given Python version ? Regards What's happenin kats! Hajimemashite! Community Center Say Hello! by bondo … to absorb information. I've only worked in Pythong and Java so far, and pythong was only for about 4 weeks. Eh… python mysql doesnt work?plz help Programming Software Development by dummies2 …;</html>""" [/code] I'm using pythong to connect to mysql. here is my table structure for… object.__new__() takes no parameters Programming Software Development by lewashby … any and all replies. This code is from the book Pythong programming for the absolute beginner". Moving and object until the program ends Programming Software Development by kmilof …) window_update() [/CODE] "utalcanvas" is an updated version of pythong and practically identical to Tkinter, so the code is the… Convert Python function to C# Programming Software Development by yordan.todorov.35 … i wanted to ask if someoen can direct me to Pythong to C# convertor or help me convert this function. from… TypeError driving me nuts Programming Software Development by Valosar First of all I'm using pythong 2.7.3 and libtcod 1.5.1 I am … Re: Speeding up finding all spaces (' ') in text Programming Software Development by Ene Uran … Pyton programmers do pythonerous: something hard to do in Python pythong: a short piece of Python code that works pythonorean: someone… Re: Python GUI Programming Programming Software Development by Cmini This tutorial is really helpful in understanding pythong GUI programming. Re: How to copy folders/directories using python Programming Software Development by D_rOiD … to learn phyton. I found some great youtube videos on pythong, just search for python. To all Linux/Unix guys, python… Re: Invoking Python scripts from CMD Programming Software Development by C0ding … ask you a question, i would like to write a pythong batch, something like a batch in windows with something on… Re: What's happenin kats! Hajimemashite! Community Center Say Hello! by peter_budo Welcome bondo, hope you enjoy our huge community and find answer to your questions Re: What's happenin kats! Hajimemashite! Community Center Say Hello! by christina>you Welcome Jordan... :) Re: What's happenin kats! Hajimemashite! Community Center Say Hello! by jbennet welcome! Re: What's happenin kats! Hajimemashite! Community Center Say Hello! by bondo Skanks everyone!!!! Re: What's happenin kats! Hajimemashite! Community Center Say Hello! by happygeek Hi Jordan, welcome aboard the good ship DaniWeb. Re: python mysql doesnt work?plz help Programming Software Development by bumsfeld I keep reading that MySQL is hard to program with, no matter what computer language you use. Hope you find someone familiar with MySQL. Re: python mysql doesnt work?plz help Programming Software Development by BearofNH > what is wrong with the code. Several things, actually. What is the stray quote doing in: [inlinecode]font-family: Arial, sans-serif; font-size: 11pt">[/inlinecode] ? But I suspect the real problem is here: [inlinecode]print """<option value = [COLOR=red]%d[/COLOR]>%s, %s</option>""" \… Re: object.__new__() takes no parameters Programming Software Development by Gribouillis The indentation is bad. The code should read [code=python] # Classy Critter # Demonstrates class attributes and static methods class Critter(object): """A virtual pet""" total = 0 def status(): print "\nThe total number of critters is", Critter.total status = … Re: object.__new__() takes no parameters Programming Software Development by lewashby [QUOTE=Gribouillis;1059519]The indentation is bad. The code should read [code=python] # Classy Critter # Demonstrates class attributes and static methods class Critter(object): """A virtual pet""" total = 0 def status(): print "\nThe total number of critters is", … Re: object.__new__() takes no parameters Programming Software Development by Gribouillis You probably still have the wrong indentation for the line status = staticmethod(status). Re: object.__new__() takes no parameters Programming Software Development by pythopian Better use a class method to access the class-level variables. Also, consider renaming "status" to "printStatus" as it more closely describes what the method does. [CODE]class Critter: ... @classmethod def printStatus(self, cls): print "\nThe total number of critters is", cls.total [/CODE] Re: Moving and object until the program ends Programming Software Development by griswolf you want some variation on code like this[CODE]gracefulStart() # create circle etc while True: # display the circle # do some work; pause; etc if readyToStop(): break # adjust the location of the circle gracefulEnd() [/CODE] Re: Moving and object until the program ends Programming Software Development by Gribouillis [QUOTE=griswolf;1559001]you want some variation on code like this[CODE]gracefulStart() # create circle etc while True: # display the circle # do some work; pause; etc if readyToStop(): break # adjust the location of the circle gracefulEnd() [/CODE][/QUOTE] Also possibly create a second moving circle to simulate reapearance … Re: Moving and object until the program ends Programming Software Development by sneekula This Tkinter example moves a ball (circle) in a horizontal line, but you can change that to a vertical line: [code]# a Tkinter moving ball that wraps around try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk root = tk.Tk() root.title("Tkinter Moving Ball") w = 420 h = 300 cv = tk.… Re: Moving and object until the program ends Programming Software Development by kmilof [QUOTE=sneekula;1559150]This Tkinter example moves a ball (circle) in a horizontal line, but you can change that to a vertical line: [code]# a Tkinter moving ball that wraps around try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk root = tk.Tk() root.title("Tkinter Moving Ball&…