Archaeopteryx Software, Inc.
Take Flight!Search

Wing IDE
About Us
Open Source

 Advanced Search

Re[2]: [wingide-users] modify local variables?

Rick Kier Rick Kier <>
Wed, 12 Jun 2002 18:27:37 -0400

Hello Stephan,

Tuesday, June 11, 2002, 9:10:20 PM, you wrote:

SRAD> On Tue, 11 Jun 2002, Rick Kier wrote:
SRAD> Hmm, this works for me (Wing 1.1.4 + Python 2.2.1).  The value is changed
SRAD> in the debugger display too  I tried a couple of different cases and all
SRAD> worked... does it always fail for you

Only tried one variable here.  Tried one at work which failed as

SRAD> or any chance you can see a pattern for the cases it fails?

Will try more cases asap.
Tried a small file on Win2K with same results - see below

Hope it is something we are doing wrong.

BTW, is it possible to modify a variable in the gui?

SRAD> Also, if you type the value name in the Debug
SRAD> Probe, does it show the correct new value

It shows the old value.

SRAD> or the old one?  Finally, does
SRAD> it help to do the following:

SRAD> locals()['myvar'] = 'myvalue'

That prints the old value before and after the change.

Just created a small file


aGlobal = 5

class myClass:  
  def __init__(self):
    aLocal = 5
    self.x = 6
    self.y = 4

x = myClass()


Output from interactive debug probe when broken at line self.y = 4:
>>> locals()
{'aLocal': 5, 'self': <__main__.myClass instance at 0x008D3578>}
>>> aLocal = 0
>>> locals()
{'aLocal': 5, 'self': <__main__.myClass instance at 0x008D3578>}
>>> locals()['aLocal']
>>> locals()['aLocal'] = 0
>>> locals()
{'aLocal': 5, 'self': <__main__.myClass instance at 0x008D3578>}
>>> print aGlobal
>>> aGlobal = 9
>>> print aGlobal

  Dick Gordon and Rick Kier

Run by Mailman v 2.0.8

Copyright (c) 2000-2002, Archaeopteryx Software, Inc.
Legal Statements