Python and Eclipse

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fuffens
    New Member
    • Oct 2006
    • 38

    #1

    Python and Eclipse

    Hi!

    Does anyone here have experience with Python in Eclipse environment? I have downloaded the Pydev plug-in for Eclipse. I like the editor and I find it very useful to be able to add files in a project and easily navigate between the files. I can start a Python interactive window. However, the Python interactive window does not keep varibles in memory from the Python scripts that I run. Also, when I debug I want to be able to set a breakpoint and use the interactive window to test code when I reach the breakpoint. I can go to the interactive window while debugging, but I does not keep the execution in memory.

    Is there some way to execute a Python script in Eclipse and use the interactive window in a similar way as for PythonWin? Is there any other plug-in than Pydev that will allow this? Or can you recommend another IDE that is as simple to use as PythonWin regarding the interactive window, but will allow to create projects with a simple navigate view.

    Any comments will be helpful.

    Best regards
    /Fredrik
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    I'll bet that if you look in Task Manager, you will see that there is a second (or maybe third) python process running (one for the shell - interpreter window - and one for the program that you are debugging). If (like IDLE) there is an option for something like "don't use separate thread", then all namespaces get shared. You end up with all the variables of the interpreter visible with your variables (not ideal, but it works). A really good environment will provide all these things that you want - break points (although I just use print statements) AND introspection (ability to look inside all variables) - here print statements work for me also. I haven't looked at Eclipse yet, but may take a peek soon. I hape someone on this forum has the experience that you are looking for. Good luck - "talk" to you soon,
    Barton

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      I'm thinking that you have already found this link?

      Comment

      • jason2007
        New Member
        • Feb 2007
        • 1

        #4
        Hi!
        I am looking for the same thing as foffens. I only found a commercial extension which porbably has the desired solution. Did anybody have any other ideas/hints?
        Comments very welcomed!
        Jason




        Originally posted by fuffens
        Hi!

        Does anyone here have experience with Python in Eclipse environment? I have downloaded the Pydev plug-in for Eclipse. I like the editor and I find it very useful to be able to add files in a project and easily navigate between the files. I can start a Python interactive window. However, the Python interactive window does not keep varibles in memory from the Python scripts that I run. Also, when I debug I want to be able to set a breakpoint and use the interactive window to test code when I reach the breakpoint. I can go to the interactive window while debugging, but I does not keep the execution in memory.

        Is there some way to execute a Python script in Eclipse and use the interactive window in a similar way as for PythonWin? Is there any other plug-in than Pydev that will allow this? Or can you recommend another IDE that is as simple to use as PythonWin regarding the interactive window, but will allow to create projects with a simple navigate view.

        Any comments will be helpful.

        Best regards
        /Fredrik

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by jason2007
          Hi!
          I am looking for the same thing as foffens. I only found a commercial extension which porbably has the desired solution. Did anybody have any other ideas/hints?
          Comments very welcomed!
          Jason
          If eclipse doesn't have the "import module into shell" command (the way that Boa Constructor does), you can:
          >>> from whateverModule import *
          then call any function or create classes in the shell and have all the values available.

          Comment

          Working...