title: Python shell and execfile scope
body: <p>I'm working from inside an ipython shell and often need to reload the script files that contain my functions-under-construction.</p>
  
  <p>Inside my main.py I have:</p>
  
  <p>def myreload():
      execfile("main.py")
      execfile("otherfile.py")</p>
  
  <p>Calling myreload() works fine if I have already ran in the same ipython session the execfile commands directly.</p>
  
  <p>However, for some reason, if the session is fresh and I just called execfile("main.py"), then myreload() doesn't actually make the functions from inside otherfile.py available. It doesn't throw any error though.</p>
  
  <p>Any ideas?</p>