Name Error

Curtis Jensen cjensen at bioeng.ucsd.edu
Wed Jan 3 16:12:21 EST 2001


Below is a bit from my Python interpreter.  The "stored_data" variable
is a global list.  It should be seen from within the "send_data"
function.  However, I get a NameError here.  I ran it with pdb; pdb is
able to output the "stored_data" variable from within the "send_data"
function.  However, it still gives a NameError.  

"stored_data" works in all of my other functions except this one?  Any
ideas?

>>> pdb.run( 'main()' )
> <string>(0)?()
(Pdb) b send_data
Breakpoint 1 at cont_client.py:3078
(Pdb) r
> <string>(1)?()
(Pdb) c
CONTINUITY ver 5.00
Wed Jan  3 12:50:16 2001
CONTINUITY>> send
> cont_client.py(3078)send_data()
-> print stored_data[0]
(Pdb) p stored_data
[<Dimensions.Dimensions instance at 100f0f68>]
(Pdb) n
NameError: 'stored_data'
> cont_client.py(3078)send_data()
-> print stored_data[0]
(Pdb)

-- 
Curtis Jensen
cjensen at bioeng.ucsd.edu
http://www-bioeng.ucsd.edu/~cjensen/
FAX (425) 740-1451



More information about the Python-list mailing list