Jakub Debski wrote:

> Is it possible to execute global code (module-level code) more than
> once keeping the state of global variables? This means no reload() and
> no moving the code to a function.

You have a module containing e. g. these two statements

x = 42
x += 1

and want to rerun it with the effect of x becoming 44? That is not possible
because in Python 

x = 42

is a statement, too, and will thus be rerun.

Peter

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to