SourceForge has been redesigned. Learn more.

Question on how to use the console

  • Eric

    Eric - 2008-09-27


    I just tried pydev. It's good, but there is one thing that I want to do and can't find how:

    I create a function in the editor, start a python console, then try to use the function but I can't.
    I also can't import the file I am editing.

    Can someone explain how does the console work?



    • Fabio Zadrozny

      Fabio Zadrozny - 2008-09-29

      To get your current editor contents, right now you have to write the execfile yourself:



      I think that's the only difference in Pydev extensions regarding the console ( ) -- it adds a shortcut to start the console and to make that execfile.



      • Cameron Powell

        Cameron Powell - 2008-10-04

        Hi, I'm taking a class on Python and the compiler used in class does not work correctly on my computer. I've used eclipse for C and Java and I figured I could try Python with it as well. The issue is the stuff we do in class, they give us a pre-written script and have us enter different inputs in the console to see what results. I've figured out how to open the console but when I try to use any functions they don't work. I also have PyDev extensions installed too. Is there anyway to have this work without having to manually create the execfile?

        • Fabio Zadrozny

          Fabio Zadrozny - 2008-10-04

          You could just copy/paste you code directly there... (although the execfile should work: in the extensions: ctrl+alt+enter will do the execfile for you)



    • austin

      austin - 2008-10-08


      I also have this problem. I only have the opensource version but have purchased the extensions, I am waiting on the key!

      I tried the first suggestion offered above but no success.

      Maybe I should wait on my license key and it will work, I can get it to work from PythonWin