[Tutor] Images, and other things.
Luke Paireepinart
rabidpoobear at gmail.com
Wed Sep 30 02:01:57 CEST 2009
On Wed, Sep 30, 2009 at 1:29 AM, Corey Richardson <kb1pkl at aim.com> wrote:
> One of my friends was asking if you could make a game using python, but he
> meant a Graphics, not text game. I was wondering if that was doable.
>
Yes, there are many libraries available for doing this. Pyglet is my
favorite, but Pygame and PyOGRE and Panda and many others exist. It's not
just doable, it's probably preferable to write a game in Python. It'll be
much quicker to finish it than most other languages.
>
> Anyway....my code.
> name = raw_input("What is your name?")
> print "Hello, ", name
> int = 10 #Define the abilities.
>
... and here's your problem. You defined a variable named "int" and you
hid the "int" function so when you tried to call int(something) you were
using this variable you just defined instead of the conversion function.
> str = 10
>
This is also a bad function name because "str" is the function to convert a
value to a string.
Also, make sure you reply using "reply-all" so your message goes to the list
rather than directly to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090930/91f460b5/attachment-0001.htm>
More information about the Tutor
mailing list