How do you create a PyDev project from existing code?

I created a python project that I started developing in TextPad and Command Prompt.

http://pydev.org/manual_101_project_conf.html

This documentation briefly mentions creating a project with existing code, but I can't figure it out ...

Spoken: Create the project as if it was a new project, but leave the create default 'src' folder option unchecked and point the location to the location of the sources (or a level above) -- the next tutorial page will explain the steps to configure the PYTHONPATH (which should be done after creating the project this way).

which makes sense enough, so I created a new project and chose Don't configure PYTHONPATH (to be done manually later on)

Everything is fine, has sufficient sense. Thus, you can go to the next page, where, presumably, it is said how to configure PYTHONPATH, which should somehow make this project contain src files ??? ...

http://pydev.org/manual_101_project_conf2.html

Presumably this link contains information for creating a project from existing code. It says how to create the source file, quite simply ... So, I take the existing code from me and copy it to the source folder?

It's good that this works quite well, now I can run my modules inside the src folder, but it mentions that I have to add it to PYTHONPATH. If my files work properly, why do I need it? What purpose does this serve?

Is there anything else that I am missing in this process? The documentation just confuses me so far ... Looking for the basics, any information would be awesome

+4
source share
1 answer

In my experience, setting up PYTHONPATH in PyDev has two main interests:

  • Obvious, if you have several folders containing modules, it allows the code running in folder a to import modules into folder b
  • another is that PyDev seems to rely on this to include some parts of code completion, as well as code analysis; This last useful feature is not included for python sources that are not part of PYTHONPATH.
-1
source

All Articles