Re: [Tutor] Passing a Variable

2011-04-04 Thread Lie Ryan
On 04/04/11 11:55, Ryan Strunk wrote: > Hi list, > > I am in the midst of trying to code a game based entirely on audio cues, and > I've run into a bit of a snag when trying to monitor certain variables. I'll > lay out the framework of what I'm going for in the hope that it makes sense > when writ

Re: [Tutor] Passing a Variable

2011-04-04 Thread Andre Engels
On Mon, Apr 4, 2011 at 7:27 AM, Ryan Strunk wrote: >> I've read your code. Frankly I don't understand your problem. I also don't > see any occurrence of "health". > There isn't a reference to health here. My goal is to have this code act as > a checker for health, fatigue, time_remaining, or any o

Re: [Tutor] Passing a Variable

2011-04-03 Thread Ryan Strunk
> I've read your code. Frankly I don't understand your problem. I also don't see any occurrence of "health". There isn't a reference to health here. My goal is to have this code act as a checker for health, fatigue, time_remaining, or any other sort of statistic you'd like to throw into it. My prob

Re: [Tutor] Passing a Variable

2011-04-03 Thread bob gailer
On 4/3/2011 9:55 PM, Ryan Strunk wrote: Hi list, Hi I've read your code. Frankly I don't understand your problem. I also don't see any occurrence of "health". Could you point to a specific line of code, explain what you want and what you are getting. Also your description of the program

Re: [Tutor] Passing a Variable

2011-04-03 Thread Steven D'Aprano
On Sun, Apr 03, 2011 at 08:55:25PM -0500, Ryan Strunk wrote: > I understand that python passes variables by value and not by reference You understand wrongly. Python is neither pass-by-value nor pass-by-reference. I've written thousands of words on this topic before, so excuse me if I'm a littl

[Tutor] Passing a Variable

2011-04-03 Thread Ryan Strunk
Hi list, I am in the midst of trying to code a game based entirely on audio cues, and I've run into a bit of a snag when trying to monitor certain variables. I'll lay out the framework of what I'm going for in the hope that it makes sense when written down. In a standard video game I could have a

Re: [Tutor] passing a variable ?

2006-10-19 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I am stumped. I am trying to pass the variable 'savename' to a string > and get errors. > can someone tell me why? Thanks to all on this list. (The problem > happens in the for loop 1st line) > > This is my error > Traceback (most recent call last): > File "./ArpA

Re: [Tutor] passing a variable ?

2006-10-19 Thread Jason Massey
It should look like this:fout = file('/home/cable/sandbox/%s' % savename, 'a''w')The variables come immediately after the string your formatting.On 10/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am stumped.  I am trying to pass the variable 'savename' to a stringand get errors.can someon

[Tutor] passing a variable ?

2006-10-19 Thread dpotter
I am stumped. I am trying to pass the variable 'savename' to a string and get errors. can someone tell me why? Thanks to all on this list. (The problem happens in the for loop 1st line) This is my error Traceback (most recent call last): File "./ArpAcl.py", line 39, in ? fout = file('/h