Reloading on the fly: was: Re: Python Productivity over C++
Boudewijn Rempt
boud at rempt.xs4all.nl
Fri Jun 9 16:19:15 EDT 2000
Hung Jung Lu <hungjunglu at hotmail.com> wrote:
> I really have to raise my voice here: in Python, running means also
> compiling. Steve: sorry to point this out to you, but you really ought to
> take a look at dynamical reloading of modern script languages like Python.
> To me, that's the biggest advantage of modern script languages. In Python,
> there are no separate commands for compiling and running. And you can reload
> a Python module on the fly. Do you understand that? For many applications
> (like webservers), it is absolutely crucial that the main application keeps
> running while you are adding/modifying part of the program. That's an area
> where C++ can not do well. In Python, I often have programs running, and
> then I need to modify part of the program. I go ahead and modify the module,
> and since I have designed the main program to reload the submodules, I never
> have to stop the main application, this even if there are compiling/runtime
> errors from the submodule. Doing that in C++ is an absolute nightmare.
Could you post an example of designing the main program to reload
submodules? I'd like to get that working, too, and coming from
languages where that's impossible, I've a bit of trouble coming up
with a solution...
--
Boudewijn Rempt | http://www.valdyas.org
More information about the Python-list
mailing list