PyDev

PyDev 11.0.2 in Eclipse 2023-06 (4.28.0)

File, import projects from file system or archive Window, perspective, PyDev Project properties (alt+enter), PyDev pythonpath, source folder /${PROJECT_DIR_NAME}

Install PyDev 2.7.5 manually on Eclipse

   1 wget http://surfnet.dl.sourceforge.net/project/pydev/pydev/PyDev%202.7.5/PyDev%202.7.5.zip
   2 cp PyDev\ 2.7.5.zip  /tmp
   3 ECLIPSEDEST=/opt/ide/eclipse3.8.2
   4 cd /tmp
   5 unzip PyDev\ 2.7.5.zip
   6 cd features
   7 cp * -r $ECLIPSEDEST/features
   8 cd ../plugins
   9 cp * -r $ECLIPSEDEST/plugins
  10 $ECLIPSEDEST/eclipse &

Select menu Window, Preferences, General, Appearance, Classic Presentation, Classic Theme.

Configure PyDev

Eclipse .project sample

   1 <?xml version="1.0" encoding="UTF-8"?>
   2 <projectDescription>
   3         <name>pydevProj</name>
   4         <comment></comment>
   5         <projects>
   6         </projects>
   7         <buildSpec>
   8                 <buildCommand>
   9                         <name>org.python.pydev.PyDevBuilder</name>
  10                         <arguments>
  11                         </arguments>
  12                 </buildCommand>
  13         </buildSpec>
  14         <natures>
  15                 <nature>org.python.pydev.pythonNature</nature>
  16         </natures>
  17 </projectDescription>

.pydevproject sample

   1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
   2 <?eclipse-pydev version="1.0"?><pydev_project>
   3 <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
   4 <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
   5 <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
   6 <path>/${PROJECT_DIR_NAME}/comp_a</path>
   7 <path>/${PROJECT_DIR_NAME}/comp_b</path>
   8 <path>/${PROJECT_DIR_NAME}/comp_b</path>
   9 </pydev_pathproperty>
  10 </pydev_project>

Launch PyDev with Java 1.7

eclipePyDevGo.sh

/usr/java/jdk1.7.0_60/bin/java -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /opt/ide/eclipseJunoSR2//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -os linux -ws gtk -arch x86_64 -showsplash /opt/ide/eclipseJunoSR2//plugins/org.eclipse.platform_4.2.2.v201302041200/splash.bmp -launcher /opt/ide/eclipseJunoSR2/eclipse -name Eclipse --launcher.library /opt/ide/eclipseJunoSR2//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807/eclipse_1502.so -startup /opt/ide/eclipseJunoSR2//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.overrideVmargs -exitdata 44990005 -product org.eclipse.epp.package.jee.product -vm /usr/java/jdk1.7.0_60/bin/java -vmargs -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /opt/ide/eclipseJunoSR2//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar

Eclipse external tools

Pylint example

The ${pylint_file} comes from a string substitution. Windows, Preferences, Run/Debug, String substitution.

The PYTHONPATH is the one setted in the current project (PyDev-PYTHONPATH).

Disable pylint rule # pylint: disable=line-too-long

pip2 install pylint 
location: /home/user/.local/bin/pylint
working directory: ${project_loc} 
arguments: --disable=R,C,W ${resource_loc}

Run, external tools, external tools configuration, program. pylint , environment tab , variable PYTHONPATH
value: ${project_loc}/folder_a:${project_loc}/folder_b:${project_loc}/folder_c:${project_loc}/folder_d

Check the paths in .pydevproject

Eclipse marketplace

File types

Python/PyDev (last edited 2024-01-28 13:36:18 by vitor)