Re: Package unloading
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 09:54:52 -0600
Derek Fountain wrote:
Have you tried using "package forget"?
Yes. That seems to convince the interpreter that the package is no longer loaded, but doesn't actually delete the namespaces and procedure definitions that it created. auto_path still contains the paths to the files. All the procs in the package are still in the interpreter so they still run.
I was hoping there was some easy way to back out all that stuff, or to force the next "package require" command to go and reload the tcl file from the disk. Is there an easy way to re-source the file without having to type its full filename (which is this case is enormous)?
When I find my self in this development mode (which is rare), I typically create a "reload" command that does all the dirty work for me. Are you aware of tkcon's "Revert State" menu item?
My normal way of work is to create a way to launch console from within my app, rather than run my app from a console. That way, each time I run my app I'm assured of a fresh start, but an interactive console is just a keypress or mouse click away.
--
Bryan Oakley
http://www.tclscripting.com
.
- References:
- Package unloading
- From: Derek Fountain
- Re: Package unloading
- From: Bryan Oakley
- Re: Package unloading
- From: Derek Fountain
- Package unloading
- Prev by Date: Re: Package unloading
- Next by Date: Re: Package unloading
- Previous by thread: Re: Package unloading
- Next by thread: Re: Package unloading
- Index(es):
Relevant Pages
|