Re: new to python - trouble calling a function from another function

2010-08-07 Thread Michael Torrie
On 08/05/2010 01:25 AM, Brandon McCombs wrote: How can that be? I don't get any errors when the script executes. Surely this isn't some limitation I'm encountering? snipped code yield (p.destination - self.currenteFloor) * TRAVELTIME, self ^ To be

Re: new to python - trouble calling a function from another function

2010-08-06 Thread nn
On Aug 5, 2:01 pm, Daniel Urban urban.d...@gmail.com wrote: I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. It is on the

Re: new to python - trouble calling a function from another function

2010-08-06 Thread Jon Clements
On 5 Aug, 16:15, Brandon McCombs n...@none.com wrote: Jon Clements wrote: On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote: Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my

Re: new to python - trouble calling a function from another function

2010-08-06 Thread geremy condra
On Thu, Aug 5, 2010 at 8:15 AM, Brandon McCombs n...@none.com wrote: Jon Clements wrote: On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote: Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in

new to python - trouble calling a function from another function

2010-08-05 Thread Brandon McCombs
Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. It is on the last line of code I pasted in. I can put print statements

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Navkirat Singh
I was looking at the code, I dont have much time to go through it, but I might have found a typo - yield (p.destination - self.currenteFloor) , I think it should be currentFloor.Maybe thats your problem. Will look into the code more later. Regards, Nav On 05-Aug-2010, at 12:55 PM, Brandon

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Jon Clements
On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote: Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. It is on the last

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Ulrich Eckhardt
Brandon McCombs wrote: I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. [...] sorry about the formatting While I can certainly

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Brandon McCombs
Jon Clements wrote: On 5 Aug, 08:25, Brandon McCombs n...@none.com wrote: Hello, I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed.

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Brandon McCombs
Ulrich Eckhardt wrote: Brandon McCombs wrote: I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. [...] sorry about the formatting

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Tommy Grav
On Aug 5, 2010, at 11:20 AM, Brandon McCombs wrote: so I missed a few lines, so sue me. The problem is that when you don't post a self contained example there is no proper way to answer your question, since the problem could be outside the part you posted. already aware. I reformatted tabs to

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Neil Cerutti
On 2010-08-05, Brandon McCombs n...@none.com wrote: class Elevator(Process): def __init__(self,name): Process.__init__(self,name=name) self.numPassengers = 0 self.passengerList = [] self.passengerWaitQ = [] self.currentFloor = 1 self.idle = 1

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Daniel Urban
I'm building an elevator simulator for a class assignment. I recently ran into a roadblock and don't know how to fix it. For some reason, in my checkQueue function below, the call to self.goUp() is never executed. It is on the last line of code I pasted in. I can put print statements before