Menu

Interpreter's knowledge of the script/module

2007-09-19
2013-03-15
  • Marc Scruples

    Marc Scruples - 2007-09-19

    I'm trying out EasyEclipse+PyDev because it's cross platform where my usual editor, Pythonwin (comes with the Pyhton Windows extensions), isn't.
    The big thing that's holding me up is that I can't get the interpreter to know about a script that I've just executed. For example, if I run a script that defines a class and then try to create an instance of it in the console I'll get an undefined name error. This happens if the script is part of a project, too.
    I hear emacs can be set up with this feature, so it's not unheard of. Eclipse is so configurable it seems there must be a way.

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2007-09-19

      Well... currently there's no default integration to do that. What you can do is running your script and at some point putting some code to break the application (import pdb;pdb.set_trace()) and then inspect it interactively there... The extensions also has support for interactively debugging with the console: http://www.fabioz.com/pydev/manual_adv_debug_console.html

      Cheers,

      Fabio

       
    • Marc Scruples

      Marc Scruples - 2007-09-20

      Hmm, I might be able to make that work. I'll give it a try, thanks.