Message60756
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.
|
|
Date |
User |
Action |
Args |
2008-01-20 09:57:53 | admin | link | issue1218234 messages |
2008-01-20 09:57:53 | admin | create | |
|