| |
| |
| |
|
Comments:
<0> yo pythonists <0> any volunteers for some testing ? <1> what can I use to access the serial port in python ? <2> pyserial
<2> or just open it as a device <1> ah <1> thanks <3> sorry to ask such a noobish question, but how do i set the working directory in python? is there some equivalent to the 'cd' command? <4> os.chdir() <3> cheers <5> in file DEBS.py i declare a list pq = [] (globally i think - no indentation, all the way at the top). inside "main" i fill the list with "Node(...)" - is there some weird rule stating that "Node's" inside the list can't traverse the list "pq[]"? i'm attempting something like this "for n in pq: if n.id != self.id: (do some ****)" <5> (main is found in debs.py) <5> and no, i'm not accessing the list before it has any content.. all initialization is done and over with before i'm trying to traverse the list in the other file (and yes, i did "import DEBS" at the top of the "Node.py" file <5> http://www.rafb.net/paste/results/PWujmc22.html <- here's some sourcecode if that makes it any easier.. <5> it's the "Node.send(self,to,cmd,*args)" that fails due to empty "pq" <5> line 153
<6> Neutrino: does pq excist in the Node.py? <6> ehm <6> exist even ;) <5> it exists in debs.py - which is imported into node.py <5> i'm somewhat of a newb to python, so i'm not entirely sure i can do it the way i have (obviously it doesn't compute) <5> Kralian: if you look at line 80 (the testfase thingy) - the output from that is "None" <6> Neutrino: that usually meens nothings been put in it, but you know that allready <5> yup :) <5> but if i simply print the pq-list instead of asking pq[0] to print the pq list, it computes fine - so the pq is full .. it's only a problem with referencing the pq from anywhere else than in debs.py that is the problem <6> how do you know it's full= <6> ? <5> checking inside debs.py <5> and i have altered the "test()" function of node.py to return DEBS.pq instead of using a print-statement, so that bug is gone - it returns "[]" an empty set
Return to
#python or Go to some related
logs:
knooble #stocks #freebsd irc ned teller #windows #politics harddrive savely remove pass xxxpassworld #bsd #politics
|
|