[Tutor] Repeat Until Dead

2013-06-26 Thread Jack Little
In a combat system, how would I have a certain raw_input repeat until the enemy is dead? Thanks a ton, Jack___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Marc Tompkins
On Wed, Jun 26, 2013 at 11:23 AM, Jack Little wrote: > In a combat system, how would I have a certain raw_input repeat until the > enemy is dead? > Sounds like a classic case for a "while" loop. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

[Tutor] Rbtg da sneak

2013-06-26 Thread Justin Dahl
Invc. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Nf

2013-06-26 Thread Justin Dahl
Bl u ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Hnoddlgfob

2013-06-26 Thread Justin Dahl
Ce xnocr u ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Danilo Chilene
Hello, Try something like this: coin = raw_input('Insert coins:\n') while(coin > 0): coin = int(coin)-1 print 'You have {0} coin(s)'.format(coin) $ python teste.py Insert coins: 2 You have 1 coin(s) You have 0 coin(s) On Wed, Jun 26, 2013 at 3:30 PM, Chris “Kwpolska” Warrick < kwpol.

Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Alan Gauld
On 26/06/13 23:07, Danilo Chilene wrote: Hello, Try something like this: coin = raw_input('Insert coins:\n') while(coin > 0): coin = int(coin)-1 print 'You have {0} coin(s)'.format(coin) Note you did not convert the original raw_input value to an int. Also you keep on converting co

[Tutor] using python for parsing

2013-06-26 Thread Makarand Datar
Hi, I know practically nothing about python. I know how to install it and all that kind of stuff. I want to use python for parsing a text file. The task is to read in a text file, and write out another text file that is written in some particular way using the data from the file that was read in.

Re: [Tutor] Question about python for web

2013-06-26 Thread Seshadri Raja
Dear Dat, Sorry for the late reply. The path of the python should be #!/usr/bin/python (or) #!/usr/bin/env python. Forward Slash(/) is missing in your CGI script. ​Enable the ExecCGI for your DocumentRoot Ref: http://httpd.apache.org/docs/current/howto/cgi.html​ ​ Options +ExecCGI ​ Kin

Re: [Tutor] using python for parsing

2013-06-26 Thread Alan Gauld
On 26/06/13 18:05, Makarand Datar wrote: I know practically nothing about python. I know how to install it and all that kind of stuff. I want to use python for parsing a text file. So far so good. Do you know how to program in any other language? It will help us direct you to a source if we kn

Re: [Tutor] Install BTrees

2013-06-26 Thread Alan Gauld
On 26/06/13 10:56, Wanbo Li wrote: Dear all, I am trying to install BTrees package on Mac OS X 10.7.5. And my python version is 2.7.3 So I used 'easy_install ZODB' and 'easy_install BTrees' to install the packages. This list is for people learning the Python language and its standard librar

[Tutor] While problem

2013-06-26 Thread Jack Little
I have a small problem with the while function.It prints an odd variable that has nothing to do with the function. It prints "Squad One!". Here is my code for the 3 def's that have something to do with the while function. def tcombat():     c1am=10     c2am=10     enam="Qasi"     ehealth=15  

Re: [Tutor] using python for parsing

2013-06-26 Thread Steven D'Aprano
On 27/06/13 03:05, Makarand Datar wrote: Hi, I know practically nothing about python. I know how to install it and all that kind of stuff. I want to use python for parsing a text file. The task is to read in a text file, and write out another text file that is written in some particular way usin

Re: [Tutor] While problem

2013-06-26 Thread Dave Angel
On 06/26/2013 08:32 PM, Jack Little wrote: I have a small problem with the while function.It prints an odd variable What variable is that? that has nothing to do with the function. It prints "Squad One!". Here is my code for the 3 def's that have something to do with the while function.

Re: [Tutor] While problem

2013-06-26 Thread Steven D'Aprano
On 27/06/13 10:32, Jack Little wrote: I have a small problem with the while function.It prints an odd variable that has nothing to do with the function. It prints "Squad One!". Here is my code for the 3 def's that have something to do with the while function. But you don't actually show us th

Re: [Tutor] Typing 'h', 'e', 'l', 'p', 'Enter' in a window

2013-06-26 Thread Marc Tompkins
On Wed, Jun 26, 2013 at 1:45 PM, kdarroud wrote: > In our Windows machine, we have several windows open. > Using Python, how can I type 'h', 'e', 'l', 'p', 'Enter' in a specific > window that is open? > In general, Python out-of-the-box doesn't know about OS-specific things like interacting with