Last Site Update: 13 October 2005 | Latest Version: 0.9.8.3 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
How do I Report a BUG?How do I configure my PYTHONPATH?How do I configure Pydev to use JYTHON?How do I reference Java projects with Jython?What is that 'Forced builtin libs' in the Python Interpreters preferences?How do I configure a python shell for experimenting with Python?The PyDev builder is taking too much of my time, what can I do about it?Why the PyDev properties do not show?I can see no new Python project, how am I supposed to use PyDev?How do I run a module from within eclipse using PyDev (either Python or Jython)?How do I know which is the command-line and PYTHONPATH used to make a python or jython run?Code completion is not working correctly for some libraryPyLint is not working, what should I do?OK, I know that many features are available, but I just don't know how can I access them through my keyboard!!How do I Report a BUG?Well, if you don't find anything that helps you, please check if it is a known BUG, if it is not, please, report it. The place to search and report BUGS is here When reporting a bug, don't forget to give the following information: - System (e.g windows XP) - Eclipse version (e.g. 3.1) - PyDev version (e.g. 0.9.7) - PyDev error log (if any): go to window->show view->other->PDE Runtime->Error log. - Eclipse install location (e.g. D:\eclipse_3\302\eclipse) - Project location where the bug appears (e.g. D:\eclipse\workspace\org.python.pydev) NOTE: the Users Forum may be used for some doubts, but if you have a bug, that's not the place to go (even though, it might be useful searching it to see if what you have is not really a bug or if someone has already asked about it). Return to top How do I configure my PYTHONPATH?There are 3 places where you have to go to configure the PYTHONPATH, and by doing so, PyLint, code completion, running and others should use this configuration. 1.Go to window->preferences->pydev->Python Interpreters and set the python interpreter location. ![]() 2.In the navigator, right click on the project root and choose 'properties'. In PyDev PYTHONPATH, you have to set your source folders (where your sources are within the project) and the external source folders (folders that are not within your eclipse environment). ![]() 3.Also in the project properties, you have to choose the project references, so that your current projects gets those projects configurations in the PYTHONPATH. ![]() Return to top How do I configure Pydev to use JYTHON?Well, Jython configuration is pretty much the same configuration used for Python. The main difference is that ALL additional jars you configure in a project must also be on your global PYTHONPATH. This is because of a bug that makes Jython unable to get class definitions just defined in the sys.path and not in the classpath (you may have problems with code-completion if you don't do that). This has already been reported as a Jython bug, and if you want more information on it, you can check at the following mailing thread: mail thread Return to top How do I reference Java projects with Jython?Actually, Java projects cannot be directly referenced. You have to add the pydev nature to the java project and add your java output class folders to the project source folders, and only then add it as a project reference. (to add the nature to a project, you have to open a python file within it with pydev). Check the question: "How do I configure my PYTHONPATH?" for information on how to add source folders to the project pythonpath. Return to top What is that 'Forced builtin libs' in the Python Interpreters preferences?Well, some libraries once installed do not really show in code completion because they do not have a corresponding module (such as __builtin__ and datetime) or they do have a corresponding module but it cannot be really used in code completion because most of its information is only gotten at runtime (such as sys and os), so, in order for code completion to get its information, you have to manually add it to those libs (and by doing so, its information is gotten with a python shell). Return to top How do I configure a python shell for experimenting with Python?Well, for that, you have to configure an external tool. Go to the menu->Run->External Tools and configure the location, working dir and don't forget to put the -i argument so that you enter in interactive mode! The picture below shows what I mean... ![]() Now, the only thing missing is running it! And don't forget to add a keybinding to rerun the last executed external tool, so that you don't have to go through the menu every time! Return to top The PyDev builder is taking too much of my time, what can I do about it?Well, if you have PyLint active, you can disable it, as it is the process that takes most time when building. Another alternative is disabling the builder altoghether. To do it you can go to window->preferences->pydev->builder and disable it. NOTE: Disabling the builders may have many side-effects, such as code completion not working, pylint, tasks, etc. So, if you really want it, you can disable it, but do it with care. Return to top Why the PyDev properties do not show?Probably you are in the JAVA package explorer or something similar. You have to use the default navigator so that it shows its properties. Also note that you have to open a python file with PyDev in the project before it appears in the properties too (the project python nature appears only after you do that). Return to top I can see no new Python project, how am I supposed to use PyDev?Well, you basically have to do a simple project and use create simple file / folder to create python modules. You may also have to associate the *.py with the PyDev editor (even though that is probably automatic). Anyway, if you need it, go to window->preferences->workbench->file associations and associate *.py with PyDev. p.s. Don't forget to put it into both of your PYTHONPATHs (enviroment and in the project properties). Return to top How do I run a module from within eclipse using PyDev (either Python or Jython)?To do that, the easiest way is going to the Run menu (Run->Run As->Python or Jython). If it is not available in your current eclipse perspective, you can enable it by going to window->customize perspective->commands and checking the "Lauch" item (in this way, you can go only with the keyboard). Another way to run a module is right clicking the module in the navigator and choosing python->run (when a .py file is selected). Return to top How do I know which is the command-line and PYTHONPATH used to make a python or jython run?If you are in doubt what is actually being passed to the run, you can go to the run menu (Run > Run...) and on the given run (python or jython), click on 'See resulting command-line for the given parameters' and check the command-line, as well as the PYTHONPATH that will be used for the run. Return to top Code completion is not working correctly for some libraryWell, code completion works by default by analyzing the source code, but, sometimes, most information is only really available at runtime (the os module and wxPython are good examples here). So, you can specify that you want to treat those as builtin libraries. For that, go to the python interpreters and add it as a 'forced builtin lib'. More information may be found at the faq: 'What is that 'Forced builtin libs' in the Python Interpreters preferences?' Return to top PyLint is not working, what should I do?1. make sure that PyLint is correctly installed in your site-packages (try running it at least once on a command-line to make sure your installation is correct). 2. Check if your project and your pythonpath are correctly configured -- pylint is only passed in files in the pythonpath for a project, so if any of those are not well configured, pylint won't work correctly. 3. If your installation is all ok, try reading the Pylint provided page to see if it is corretly configured in the eclipse side. 4. If everything fails, you can ask in the forum or submit a bug report for it (don't forget to add the following information: pylint installation path, pylint version and the other information requested on the 'How do I Report a BUG?' faq. Return to top OK, I know that many features are available, but I just don't know how can I access them through my keyboard!!
Many of them can be customized in the Keybindings menu (window->preferences->workbench->keys). Return to top |