Python

(Difference between revisions)
(Getting Started)
(Platform Manager)
 
(45 intermediate revisions not shown)
Line 2: Line 2:
<pre>
<pre>
-
This project is a community driven effort. Oracle does not actively participate in or directly support this effort.
+
This project is a community-driven effort. Oracle does not actively participate in or directly support this effort.
</pre>
</pre>
-
'''The latest installation instructions (7.4)''' appear to be at [https://blogs.oracle.com/geertjan/entry/python_in_netbeans_ide_71 Set up NetBeans IDE 7.4 to use Python]
 
-
'''To get the latest development builds''' of the Python IDE, see the [[PythonInstall| How to install page]].
+
'''If you are using NetBeans 8.1''', you can access the plugin directly from the IDE 8.1 Tools->Plugin menu. See also [http://plugins.netbeans.org/plugin/61688/?show=true the Python 8.1 plugin page] <br /> <!--  or via the [http://plugins.netbeans.org/PluginPortal/ Plugin Portal at Netbeans.org] -->
 +
''This'' plugin ONLY works with IDE 8.1.  For questions and comments, log on to [http://forums.nbPython.org forums.nbPython.org]
-
You can browse the sources of the Python support at http://hg.netbeans.org/main.
+
'''If you are using NetBeans 8.0.2''', you can [https://blogs.oracle.com/geertjan/entry/python_in_netbeans_ide_81 Get started with Python in NetBeans IDE 8.0.2] <br />
-
Before being moved to Mercurial, the project was hosted at [http://nbpython.dev.java.net http://nbpython.dev.java.net].
+
For ALL other ways to install Python in NetBeans, see the [[PythonInstall]] page.<br />
 +
[https://netbeans.org/projects/python/pages/Home Visit the Python Project wiki page]! '''We are looking for volunteers''' to help with testing and coding!
__TOC__
__TOC__
===Getting Started===
===Getting Started===
-
 
+
====Important links====
-
* [https://blogs.oracle.com/geertjan/entry/python_in_netbeans_ide_71 Set up NetBeans IDE 7.4 to use Python]
+
* For the latest high-level information, see http://nbPython.org
-
*''' Tips to build the sources''': [[NbPythonHgBuild]]
+
* '''To ask questions or make comments''', log on to http://forums.nbPython.org (simple registration required - please use your NetBeans username)
-
* '''Getting a bleeding edge build''': [[PythonInstall]]
+
* For setting up Python support on NetBeans IDE, see [[PythonInstall]]
-
* '''Using the NetBeans IDE for Python Development''': [[NetBeansPythonTutorial]].  Preliminary IDE HelpSets are also available.  
+
* To browse the sources of the Python support, see the '''files''' directory at http://hg.netbeans.org/main/contrib/ (the ones that start with "Python")
-
* [[Nbpysamples| Sample Projects]] have been added recently.
+
*''' Tips to build Python support from sources''': [[NbPythonHgBuild]]
 +
* '''Using the NetBeans IDE for Python Development''': [[NetBeansPythonTutorial]].  Preliminary IDE HelpSets are also available. <!--
 +
* [[Nbpysamples| Sample Projects]] have been added recently. (page under review -->
* '''Debugging primer''': [[Nbpythondebuggerprimer|Python Debugger Primer]]
* '''Debugging primer''': [[Nbpythondebuggerprimer|Python Debugger Primer]]
* Jython development with NetBeans: [[DevelopingJythonAppsUsingNetbeans|Developing Jython Apps Using Netbeans]]
* Jython development with NetBeans: [[DevelopingJythonAppsUsingNetbeans|Developing Jython Apps Using Netbeans]]
Line 28: Line 31:
There are several mailing lists serving different purposes:
There are several mailing lists serving different purposes:
-
* If you are interested in ''using'' the NetBeans Python plugin, use the '''nbpython@netbeans.org''' mailing list ([mailto:nbpython-subscribe@netbeans.org subscribe], [mailto:nbpython-unsubscribe@netbeans.org unsubscribe], [http://www.netbeans.org/servlets/SummarizeList?listName=nbpython&by=date archives])
+
* For ''Using'' the NetBeans Python plugin, use the '''nbpython@netbeans.org''' mailing list ([mailto:nbpython-subscribe@netbeans.org subscribe], [mailto:nbpython-unsubscribe@netbeans.org unsubscribe], [http://netbeans.org/servlets/SummarizeList?listName=nbpython&by=date archives])
-
* If you are interested in ''developing'' the NetBeans Python plugin, use the '''nbpython-dev@netbeans.org''' mailing list ([mailto:nbpython-dev-subscribe@netbeans.org subscribe], [mailto:nbpython-dev-unsubscribe@netbeans.org unsubscribe], [http://www.netbeans.org/servlets/SummarizeList?listName=nbpython-dev&by=date archives])
+
* For ''Developing'' the NetBeans Python plugin, use the '''nbpython-dev@netbeans.org''' mailing list ([mailto:nbpython-dev-subscribe@netbeans.org subscribe], [mailto:nbpython-dev-unsubscribe@netbeans.org unsubscribe], [http://netbeans.org/servlets/SummarizeList?listName=nbpython-dev&by=date archives])
-
* If you would like to track issues, use the '''nbpython-issues@netbeans.org'''  
+
**See also the [http://forums.netbeans.org/viewforum.php?f=7 NetBeans Developers forum]  (post a message on this forum if you would like to contribute!)
-
mailing list
+
* To ''track issues'', use the '''nbpython-issues@netbeans.org''' mailing list
-
* Si vous souhaitez sécuriser les données dans un coffre fort ignifuge visiter le site http://www.infosafe.fr . Il y a également des armoires fortes et des coffrets à clés
+
* To be ''notified about commits'', use the '''nbpython-commits@netbeans.org''' mailing list
-
* If you would like to be notified about commits, use the '''nbpython-commits@netbeans.org''' mailing list
+
<!-- commented out but left for history. See also http://wiki.netbeans.org/AmitKumarSaha
-
 
+
-
Old mailing list archives can be found at [https://nbpython.dev.java.net/servlets/ProjectMailingListList https://nbpython.dev.java.net/servlets/ProjectMailingListList]
+
See also [http://blogs.sun.com/amitsaha/entry/python_support_in_netbeans_low Contributing to the project]
See also [http://blogs.sun.com/amitsaha/entry/python_support_in_netbeans_low Contributing to the project]
 +
-->
===Features===
===Features===
Line 44: Line 46:
Code completion is available for
Code completion is available for
-
* Modules available for imports
+
<!-- * Modules available for imports -->
-
* Imported symbols
+
<!-- * Imported symbols *** these two not working as of 21-nov-2015 -->
* Local variables
* Local variables
* Other known classes and functions
* Other known classes and functions
Line 51: Line 53:
In addition, documentation is shown when available.
In addition, documentation is shown when available.
-
 
+
<!-- cmt out. Should find where link has been moved to at Oracle...
-
http://blogs.sun.com/tor/resource/pycompletion3.png
+
http://blogs.sun.com/tor/resource/pycompletion3.png -->
[[Image:code-completion_Python.png]]
[[Image:code-completion_Python.png]]
Line 85: Line 87:
[[Image:semantic-highlighting_Python.png]]
[[Image:semantic-highlighting_Python.png]]
 +
<!-- (temporarily commented out until fixed)
====Instant Rename====
====Instant Rename====
Line 94: Line 97:
[[Image:instant-rename_Python.png]]
[[Image:instant-rename_Python.png]]
 +
-->
====Mark Occurrences====
====Mark Occurrences====
Line 103: Line 107:
[[Image:mark-occurrences_Python.png]]
[[Image:mark-occurrences_Python.png]]
-
====Refactoring====
+
<!--
 +
====Refactoring==== (temporarily commented out until fixed)
Find Usages, and Rename, are available. TODO: Add screenshots.
Find Usages, and Rename, are available. TODO: Add screenshots.
 +
-->
====Debugger====
====Debugger====
Line 117: Line 123:
Multi-threaded debugging: [http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html]
Multi-threaded debugging: [http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html]
-
====Platform Manager====
+
====Python Platform Manager====
-
The platform manager lets you specify which Python runtime (CPython or Jython) you wish to use.  You can control which CPython is used, as well as specifying values for command line arguments.  It is also possible to set the PYTHONPATH variable to set the Python load path.
+
The Python platform manager lets you specify which Python runtime (CPython or Jython) you wish to use.  You can control which CPython is used, as well as specifying values for command line arguments.  It is also possible to set the PYTHONPATH variable to set the Python load path.
[[Image:platform-manager_Python.png]]
[[Image:platform-manager_Python.png]]
-
 
+
<!-- comment out not working 
====Code Coverage====
====Code Coverage====
-
 
+
[https://blogs.oracle.com/tor/entry/netbeans_screenshot_of_the_week6 https://blogs.oracle.com/tor/entry/netbeans_screenshot_of_the_week6]
-
[http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week6 http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week6]
+
====Test Runner UI====
====Test Runner UI====
-
[http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week7 http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week7]
+
[https://blogs.oracle.com/tor/entry/netbeans_screenshot_of_the_week7 https://blogs.oracle.com/tor/entry/netbeans_screenshot_of_the_week7]
 +
Closeup at [https://blogs.oracle.com/tor/resource/python-testrunner.png https://blogs.oracle.com/tor/resource/python-testrunner.png]
 +
 +
-->
 +
<!-- comment out not working 
====Creating Python Eggs====
====Creating Python Eggs====
-
[http://amitksaha.blogspot.com/2009/01/hatching-python-eggs-from-netbeans.html http://amitksaha.blogspot.com/2009/01/hatching-python-eggs-from-netbeans.html]
+
See the [[PyEgg| PyEgg Wiki page]]
 +
and his blog disappeared !
 +
[http://amitksaha.blogspot.com/2009/01/hatching-python-eggs-from-netbeans.html http://amitksaha.blogspot.com/2009/01/hatching-python-eggs-from-netbeans.html]
 +
-->
 +
<!-- comment out historical...
===Planning===
===Planning===
Planning for NetBeans 7.0 has moved to http://wiki.netbeans.org/Python70Roadmap
Planning for NetBeans 7.0 has moved to http://wiki.netbeans.org/Python70Roadmap
Line 174: Line 187:
* [[Media:jython-antlr_Python.jar]]
* [[Media:jython-antlr_Python.jar]]
* [[Media:external_Python.zip]]}}
* [[Media:external_Python.zip]]}}
 +
-->

Current revision as of 20:28, 21 December 2015

Python support in NetBeans

This project is a community-driven effort. Oracle does not actively participate in or directly support this effort.


If you are using NetBeans 8.1, you can access the plugin directly from the IDE 8.1 Tools->Plugin menu. See also the Python 8.1 plugin page
This plugin ONLY works with IDE 8.1. For questions and comments, log on to forums.nbPython.org

If you are using NetBeans 8.0.2, you can Get started with Python in NetBeans IDE 8.0.2

For ALL other ways to install Python in NetBeans, see the PythonInstall page.

Visit the Python Project wiki page! We are looking for volunteers to help with testing and coding!

Contents


Getting Started

Important links

Mailing lists

There are several mailing lists serving different purposes:

  • For Using the NetBeans Python plugin, use the nbpython@netbeans.org mailing list (subscribe, unsubscribe, archives)
  • For Developing the NetBeans Python plugin, use the nbpython-dev@netbeans.org mailing list (subscribe, unsubscribe, archives)
  • To track issues, use the nbpython-issues@netbeans.org mailing list
  • To be notified about commits, use the nbpython-commits@netbeans.org mailing list

Features

Code completion

Code completion is available for

  • Local variables
  • Other known classes and functions
  • Keywords

In addition, documentation is shown when available.

Image:code-completion_Python.png

Smart Indent, Outdent, and Pair matching

Pressing the return key will indent or outdent in a smart fashion. Matching for (), [[ | ]], , and "" is supported.

Image:pair-matching_Python.png

Editor Hints

Editor hints provide the capability to dynamically check the syntax and the semantics of your python code.

Detailed descriptions of the available python hints are available in this document.

http://wiki.netbeans.org/wiki/attach/PythonHints/circularredundancy.png

Code Folding

Classes, methods, functions, and triple quoted strings can be folded to conserve screen real estate and reduce clutter.

Unfolded code:

Image:unfolded-code_Python.png

Folded code:

Image:folded-code_Python.png

Semantic highlighting

Syntax highlighting reflects the semantics of the program: local and global variables are colored appropriately (and differently)

Image:semantic-highlighting_Python.png


Mark Occurrences

Placing the caret on a variable shows other uses of the variable. Placing the caret on a function or method call shows other calls to the function or method.

(Note - this screenshot is a bit old, and the bug shown here (the scope of name incorrectly includes for example the parameter in the nested function "withversion") has been fixed)

Image:mark-occurrences_Python.png


Debugger

The debugger is derived from Jean-Yves Mengant's jpydbg debugger. A primer is available here at : http://wiki.netbeans.org/nbpythondebuggerprimer

Image:debugger-local-variables_Python.png

Image:debugger-command-prompt_Python.png

Multi-threaded debugging: http://jpydbg.blogspot.com/2009/01/jpydbg-mutithreaded-python-debugger.html

Python Platform Manager

The Python platform manager lets you specify which Python runtime (CPython or Jython) you wish to use. You can control which CPython is used, as well as specifying values for command line arguments. It is also possible to set the PYTHONPATH variable to set the Python load path.

Image:platform-manager_Python.png


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo