Last Site Update: October 20th, 2024 | Latest Version: 12.2.0 |
|
|
|
|
|
|
|
|
Here you will learn to further configure your project and add Python information to an already existing project. The first thing to know about PyDev is that to use it to its full extent, you must have your python modules beneath a source folder (the source folders are the paths that are added to your PYTHONPATH). You can add a new source folder in the menu: File > new > other > PyDev > source folder or right-click and existing project or folder and select PyDev > Set as Source Folder. NOTE: You may use PyDev without configuring that, for quick scripts, but some features such as code analysis may not work at all (but you will still have syntax highlighting and the default editor actions).
You may see which Python information your project has by going to the PyDev Package Explorer, rigth-clicking the project you want info on and selecting 'properties' (or pressing Alt+Enter with the project selected):
The external source folders are useful if you have some external library or compiled extension that is used solely for one project, so that you don't have to add it to the system PYTHONPATH, however, the information on such folders works as the system information works, it is gathered once and then 'set in stone', so, if you will change it, it is recommended that you create a project for it and make a project reference to that project.
The String Substitution Variables can be used in conjunction with the source folders, external source folders and run configurations. From the example below, if a reference ${GOOGLE_APP_ENGINE}/lib was present in the external source folders, it'd be resolved to D:/bin/google_app_engine122/lib.
Note that here you can also set a different grammar version (you can have configured an interpreter that uses grammar 2.6 and still use a 2.4 grammar – this is done so that you can use newer interpreter while programming using an older grammar, which is useful on cases where you have to keep backward compatibility). The selection of the interpreter will define which interpreter will be used to create the default run configurations and the shells for code-completion purposes (to gather the forced builtins).
The referenced projects are the projects whose source folders are added to the PYTHONPATH for the referrer project. This is very important so that code completion and run configurations work correctly. Note that it'll get the configurations recursively, so, if a project A depends on B, which in turn depends on C, you just have to add a reference from A to B (and C will already be automatically referenced)
Project reference for Jython usersJython projects may reference Java (JDT) projects. To create that reference, it's not enough to just add the reference to the JDT project from the PyDev project, the JDT project must be set as a PyDev project and its bin folders must be properly configured as source folders for PyDev. To do that, right-click the project and select PyDev > Set as PyDev project and add the bin folders as if they were regular PyDev source folders (the ones containing your .class files – the folders containing the .java classes shouldn't be referenced in the PyDev config). Note: Before version 1.4.8, PyDev did not handle a JDT project which had .py files correctly (even if the folders were properly configured)
|
PyDev developmentPyDev is open source and depends on your contributions! This may be in the form of bug fixes, answers on stackoverflow, new features...Another option is financially supporting it at: Patreon (which provides a way to support it monthly and get rewards starting with $1). Or through 1-time contributions at: Paypal Search PyDev-related content |
|
|
Copyright: Brainwy Software Ltda, 2014-2021 |