I can run my pygame project fine in either of the IDEs I use (Spyder and IEP), but then I try makes changes to some of the .py files and when I run the project again, the changes don't show up. I think this has something to do with the IDEs running .py files as scripts, but I can't figure out a good solution. I tried deleting the compiled files but the same problem still occurs.
- Whenever you make a change to your .py files, you need to save them and restart the python session. You're saying that when you do that, nothing changes?TankorSmash– TankorSmash2013-04-20 22:40:09 +00:00Commented Apr 20, 2013 at 22:40
- No, that works, but I was hoping to not have to restart the python session every time I make a changezergylord– zergylord2013-04-20 22:52:50 +00:00Commented Apr 20, 2013 at 22:52
Add a comment |
1 Answer
You can use the reload function to update the running python instance with the updated files.
3 Comments
zergylord
So do I call reload(MyModuleName) or reload(ModulesMyCodeUses)?
TankorSmash
@zergylord You'd need to reload the modules that have changed since your last save.
zergylord
anyway to just reset all modules? My project has alot of files in it :-/