Your algoreload() is of the hand of a master.
I'll give it a try.
Thank you Bengt!
--
http://mail.python.org/mailman/listinfo/python-list
Bengt Richter wrote:
> What about something on the pattern of (untested!)
>
> import algomodule # first time
>
> def algoreload():
> algosource = algomodule.__file__.replace('.pyc','py')
> algomodule.__dict__.clear()
> try:
> execfile(algosource, algomodule.
On Mon, 05 Sep 2005 11:53:09 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
>>
>> I seem to recall a post by Diez Roggish that reload() doesn't always
>> work as it should. Any news on this? At least im my preliminary test it
>> works.
>
>Read the docs on reload:
>
>http://www.python.org/d
can you send a small example of thing you are trying to do? As Python
is *really* dynamic, you can adapt algorithms in many ways... in
general, you can change methods, or even class! of almost any object...
--
http://mail.python.org/mailman/listinfo/python-list
Diez,
You are quite right on using module.name when importing module objects.
This happened to be the way I ran my initial successful tests. Later I
modified things by using 'import * from algotest' and my modifications
stopped from coming through.
In my case reload comes in very handy. I can see
>
> I seem to recall a post by Diez Roggish that reload() doesn't always
> work as it should. Any news on this? At least im my preliminary test it
> works.
Read the docs on reload:
http://www.python.org/doc/current/lib/built-in-funcs.html
"""
If a module is syntactically correct but its initia
Hi Robert:
(1) Things are not that simple. In fact in setting up a run, extensive
database backup is already involved. Subsequently, data structures are
built at runtime of typically 0.5Gbytes. Although saving this should
work, it would require quite some debug/verification to check out the
validit
I wrote a module testalgo.py with some functions to be modified.
After modification I typed to the interactive shell:
>>>import testalgo
>>>reload(testalgo)
... and things seem to workout as you suggested. At least I modified
some quickie print statements to check. I use eric3 and nothing in this
I