G
Glenn Reed
Hi,
Someone might be able to help me with this. If I am using PythonWin (as
part of the ActiveState Python distribution) (lastest release 2.2) and have
two files in the editor window.
---- module1.py --------
class module1:
def __init__(self):
self.x=23
self.y=14
self.z=33
self.x1=self.x
---- tmod.py ----
# Test Module
import module1
thisClass = module1.module1()
print thisClass.x
------------------------
and then I run this script tmod.py I get the correct answer 23
However if I then go back and change the value of the variable in module1.py
and change 'self.x=23' to 'self.x=45' and run the tmod.py script again I
still get the answer 23. I click the "save all files" icon which is a
picture of 3 floppy disks and run the tmod.py again and I still get 23. If
I exit PythonWin and start it again and load the same scripts I get the
correct answer 45. I have tried closing and reopening the module1.py source
file but nothing helps until I restart PythonWin.
Does anyone know what is happening here?
Thanks in advance.
Glenn.
Someone might be able to help me with this. If I am using PythonWin (as
part of the ActiveState Python distribution) (lastest release 2.2) and have
two files in the editor window.
---- module1.py --------
class module1:
def __init__(self):
self.x=23
self.y=14
self.z=33
self.x1=self.x
---- tmod.py ----
# Test Module
import module1
thisClass = module1.module1()
print thisClass.x
------------------------
and then I run this script tmod.py I get the correct answer 23
However if I then go back and change the value of the variable in module1.py
and change 'self.x=23' to 'self.x=45' and run the tmod.py script again I
still get the answer 23. I click the "save all files" icon which is a
picture of 3 floppy disks and run the tmod.py again and I still get 23. If
I exit PythonWin and start it again and load the same scripts I get the
correct answer 45. I have tried closing and reopening the module1.py source
file but nothing helps until I restart PythonWin.
Does anyone know what is happening here?
Thanks in advance.
Glenn.