Re: Importing v reloading modules modules

2010-03-19 Thread Gabriel Genellina
En Fri, 19 Mar 2010 14:09:09 -0300, Peter Peyman Puk escribió: I am running a simulator written in python. The simulator has a small TextView (actually a SourceView) widget which lets the user writes scripts, and when they are satisfied they can execute that script to get results. For ar

Re: Importing v reloading modules modules

2010-03-19 Thread Terry Reedy
Reload is effectively deprecated in 2.x and removed in 3.x, so I recommend not using it. Deleting an entry from sys.modules should force recreation with an import. Just make sure all other references are also gone so that the module object can be deleted. The following shows how to import by