|
For a wikki dedicated to this topic, see http://www.python.org/cgi-bin/moinmoin/EclipsePythonIntegration 1 Using Eclipse as a Python editorA few plugins for Eclipse are in progress that will enable Eclipse to be used as a Python IDE. Some of these are stable enough for early use:
Inactive/dead (apparently) plugin projects:
1.1 What these plug-ins actually doThe next seven sections of documentation, up to and including "Supplying parameters to your jython or python program" are contributed by Andy Bulka abulka@netspace.net.au
Generic Useful Features:
Note: The ability to run jython or python on the current file needs to be configured manually (see step 2, below) and doesn't require either of these plugins to do. 1.2 Which plug-in is better?All three support the SHIFT-TAB de-indent keystroke.
The pyeclipse plug-in provides a python' perspective which ensures that the console window is visible and hides the 'launch' button (which is only for running java apps). Note: once you have this perspective installed, you can switch to one of the other python plugins (see how to do this in the next section), and the "perspective view" will remain installed. In fact you can easily create a python perspective yourself, from within Eclipse (a perspective is just a configuration of what panels and windows you want open at the one time). 1.3 Installing the plug-insUnzip the plugin and drag the folder into the eclipse/plugins directory, then restart eclipse.
You can switch between the plug-ins by moving one directory out of the plugins folder and the other in to the plugins folder. 2 Configuring Eclipse for running Python and Jython2.1 JythonTo configure Eclipse to run jython on the current file you are editing: Select from the menu: Run -> External Tools -> Configure -> New then fill in the following values:
2.2 PythonInstructions for configuring to run regular python from within Eclipse can be found in the pyeclipse forum http://sourceforge.net/forum/forum.php?thread_id=717580&forum_id=194323 However, I prefer to set my Working Directory to ${container_loc} since this lets you launch python on files that are inside folders within your project. More resilient. Here are my instructions: Select from the menu: Run -> External Tools -> Configure -> New then fill in the following values:
2.2.0.1 Supplying parameters to your jython or python programIf you need to run an app which requires arguments, you will need to make another tool configuration (just copy the jython one) and simply add the necessary arguments to the Tool Arguments field. For example instead of just you would instead put Notice I have supplied the argument c:\\
For a wikki dedicated to this topic, see http://www.python.org/cgi-bin/moinmoin/EclipsePythonIntegration
|