I have two questions in regards to the PyDev (Python editor for Eclipse) and its interactive console.
Here is my current situation: whenever I run the interactive console (ctrl + alt + enter), the console requires that I then import the file in the project to use any functions in that file. Furthermore, when calling the function, I must put the file name in front of it. So, for example: I go to my properties for the project, go to the PyDev PYTHONPATH, and add a source folder for the project I am currently working on. By doing so, I can then import a file, let's call it "homework", into the interactive console. If my file has a function called "calculate", I will have to first type "import homework", then type "homework.calculate()" in order to use the said function. Otherwise, it won't work (I cannot simply call "calculate").
This brings me to my first question (#1): Why does this not apply for imported modules, such as "math" and such? Why do I need to do so much work for a local project file?
My second question is related (#2): How do I set-up my PyDev such that it automatically imports the current project's files into the interactive console? Or, even if I have to manually add my project file, how do I make it so I don't have to call the "file name" + "function name" in order to use the function?
Much help would be appreciated. Thank you.