Author sonderblade
Recipients
Date 2005-06-10.13:49:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
This is test.py:

def foo():
    print "Bla"

And in an interactive session:

>>> import inspect, test
>>> test.foo()
Bla
>>> inspect.getsource(test.foo)
'def foo():\n    print "Bla"\n'

Now I edit test.py to (without exiting the interactive
session):

def foo():
    print "Oh no!"

>>> reload(test)
<module 'test' from 'test.py'>
>>> test.foo()
Oh no!
>>> inspect.getsource(test.foo)
'def foo():\n    print "Bla"\n'

inspect should output the new source.
History
Date User Action Args
2008-01-20 09:57:53adminlinkissue1218234 messages
2008-01-20 09:57:53admincreate