PythonWin IDE doesn't save all project files??

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.
 
D

Dennis Lee Bieber

Glenn Reed fed this fish to the penguins on Saturday 29 November 2003
17:01 pm:
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?
Common problem... "import" only imports once, per environment. Changes
to a module file are not read on subsequent executions without exiting
the environment (ie, exiting PythonWin). A manual reload(module) may
work.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top