[Tutor] Modifying Source Code while Program is Running

Kent Johnson kent37 at tds.net
Fri Nov 25 23:03:39 CET 2005


Ed Singleton wrote:
> Can a python program change a class, change all the objects already
> created by that class and save the modified class definition, so that
> if the program were restarted it would return to exactly the same
> state? (assuming all objects were saved to a database or somesuch).

I asked on comp.lang.python about persisting classes. David Wahler posted an interesting solution. You can read the thread here:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/10a03f094303a91c/7d65bd344d4e0063?hl=en#7d65bd344d4e0063

(David's reply hasn't appeared on Google as I post this but it should be there eventually...)

Kent
-- 
http://www.kentsjohnson.com



More information about the Tutor mailing list