Difference between revisions of "Development/Languages/Python"

Jump to: navigation, search
(34 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{note| PyKDE 4 is in development. See below for details. PyQt4 is finished and can be found [http://www.riverbankcomputing.co.uk/software/pyqt/intro here]}}
 
  
Python is a powerful object oriented scripting language. You can find out more about the language itself on the Python website at http://www.python.org/.
+
Python is a powerful object oriented, dynamic language. You can find out more about the language itself on the Python website at http://www.python.org/.
  
* [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt] and [http://www.riverbankcomputing.co.uk/software/pykde/intro PyKDE] bindings <br />''<font size="-1"> Powerful python bindings to the Qt and KDE libraries. These bindings support overloading of virtual functions by python code, so you can even create new widgets in Python. </font>''
+
Two important pieces of software are needed to develop KDE applications using Python, [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt] and PyKDE. PyQt provides Python support for the Qt library which KDE is built on. PyQt can be obtained at http://www.riverbankcomputing.co.uk/software/pyqt/ . Riverbank Computing has a lot of good documentation about how to use PyQt to create pure Qt applications. If you are new to KDE / Python development, then learning how to use PyQt is the best first step.
* [http://www.xs4all.nl/~bsarempt/python/tutorial.html KDE-Python tutorial]<br />''<font size="-1"> A python version of Daniel's KDE tutorial by Boudewijn Rempt. </font>''
+
* [http://vizzzion.org/?id=pyqt Python-Qt tutorial]<br />''<font size="-1"> In this tutorial, the basic steps of creating a Qt-based application with PyQt are explained. </font>''
+
* [http://www.thekompany.com/projects/vp/ VeePee]
+
* [http://websvn.kde.org/trunk/KDE/kdebindings/dcoppython/ DCOP via Python]
+
  
==Abstract==
+
PyKDE builds on top of PyQt and adds Python support for KDE's libraries and technologies.
The PyKDE4 bindings will be made using [http://www.riverbankcomputing.co.uk/software/sip/intro SIP].  
+
  
==Status==
+
PyKDE is distributed as part of the kdebindings module. Stable releases can be downloaded from the normal [http://kde.org/download/ KDE download page], although it is usually easier to install pre-built packages from your operating system distribution. You can also obtain PyKDE from KDE's subversion repository:
  
As of 1-Sep-07 PyKDE code is essentially complete, except for Phonon module support. The package is now in KDE's subversion repository in /trunk/KDE/kdebindings/python/pykde4/. Current work is on examples, docs, and related tools (pykdeuic, etc.) Anyone wishing to work on either example code or test code should contact Jim Bublitz - jbublitz@nwinternet.com.
+
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings/python/pykde4
 +
 
 +
The code in subversion can be browsed online via http://websvn.kde.org/trunk/KDE/kdebindings/python/pykde4/.
 +
 
 +
Or from KDE's git repository:
 +
 
 +
git clone git://anongit.kde.org/pykde4
 +
 
 +
==Documentation and Tutorials==
 +
* [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt home page and documentation]
 +
* [[/Using PyKDE 4|Using PyKDE 4]]
 +
* [http://api.kde.org/pykde-4.3-api/toc.html PyKDE 4.3 Documentation]
 +
* [http://api.kde.org/pykde-4.3-api/modules.html PyKDE 4.3 API class reference]
 +
* [http://api.kde.org/pykde-4.2-api/ PyKDE 4.2 API class reference]
 +
* [[/PyKDE_WebKit_Tutorial|PyKDE WebKit Tutorial]], a simple web browser application in PyKDE
 +
* [[Development/Tutorials/Python introduction to signals and slots|introduction to signals and slots]]
 +
* [[Development/Tutorials/Python-hello world|Hello world]]. An example that you can also use as a starting point for your development.
 +
* [http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/ Introduction article about PyQt4]
 +
* [http://lateral.netmanagers.com.ar/stories/BBS47.html PyQt by Example]
 +
* [[/PyKDE_DBus_Tutorial|Python DBus Tutorial]]. See how to call dbus methods from PyKDE.
 +
* [[/PyKDE_Knotify_Tutorial|Python KNotify Tutorial]]. How to use Notification and Jobs in your Applications
 +
* [[Development/Tutorials/Phonon/Introduction/Python|Phonon Example]]
 +
* [[Development/Tutorials/Plasma#Plasma_Programming_with_Python|Plasma tutorials]]
 +
 
 +
 
 +
===KDE 3 and PyKDE 3===
 +
Documentation and tutorials for the older PyQt and PyKDE 3.
 +
* [http://vizzzion.org/?id=pyqt Python-Qt tutorial]<br />''<font size="-1"> In this tutorial, the basic steps of creating a Qt-based application with PyQt are explained. </font>''
  
==Further reading==
+
==Further reading and information==
 
*[http://www.riverbankcomputing.com/mailman/listinfo/pyqt PyQt and PyKDE mailing list]
 
*[http://www.riverbankcomputing.com/mailman/listinfo/pyqt PyQt and PyKDE mailing list]
*[http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt Homepage]
 
 
*[http://www.riverbankcomputing.co.uk/software/pykde/intro PyKDE Homepage]
 
*[http://www.riverbankcomputing.co.uk/software/pykde/intro PyKDE Homepage]
 
*[http://www.diotavelli.net/PyQtWiki The PyQt and PyKDE community Wiki]
 
*[http://www.diotavelli.net/PyQtWiki The PyQt and PyKDE community Wiki]
 +
*The book [http://www.qtrac.eu/pyqtbook.html Rapid GUI Programming with Python and Qt] is available and covers Qt 4 programming with Python.
 +
*The IRC channel ''#kubuntu-devel'' on freenode often has PyKDE programmers in it.
 +
*The IRC channel ''#pyqt'' on freenode is used by some PyQt application developers.
  
 +
==Applications using PyKDE==
 +
*[http://utils.kde.org/projects/printer-applet/ printer-applet]
 +
*[http://websvn.kde.org/trunk/KDE/kdeadmin/system-config-printer-kde/ system-config-printer-kde]
 +
*[http://websvn.kde.org/trunk/extragear/utils/guidance-power-manager/ Guidance Power Manager], a battery applet
 +
*[https://code.launchpad.net/ubiquity/trunk Ubiquity], installer for Kubuntu
 +
*[https://code.launchpad.net/~ubuntu-core-dev/gdebi/ubuntu GDebi], .deb package installer
 +
*[https://code.launchpad.net/~jr/install-package/trunk install-package], graphical apt-get
 +
*[http://draketo.de/light/english/pyrad pyRad], wheel type command interface
 +
*[http://websvn.kde.org/trunk/KDE/kdebindings/python/pykde4/examples/ some examples are in the PyKDE source]
 +
*[http://websvn.kde.org/trunk/KDE/kdegames/kajongg/ Kajongg], a board game
  
 
[[Category:Python]]
 
[[Category:Python]]

Revision as of 16:21, 13 July 2012

Python is a powerful object oriented, dynamic language. You can find out more about the language itself on the Python website at http://www.python.org/.

Two important pieces of software are needed to develop KDE applications using Python, PyQt and PyKDE. PyQt provides Python support for the Qt library which KDE is built on. PyQt can be obtained at http://www.riverbankcomputing.co.uk/software/pyqt/ . Riverbank Computing has a lot of good documentation about how to use PyQt to create pure Qt applications. If you are new to KDE / Python development, then learning how to use PyQt is the best first step.

PyKDE builds on top of PyQt and adds Python support for KDE's libraries and technologies.

PyKDE is distributed as part of the kdebindings module. Stable releases can be downloaded from the normal KDE download page, although it is usually easier to install pre-built packages from your operating system distribution. You can also obtain PyKDE from KDE's subversion repository:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings/python/pykde4

The code in subversion can be browsed online via http://websvn.kde.org/trunk/KDE/kdebindings/python/pykde4/.

Or from KDE's git repository:

git clone git://anongit.kde.org/pykde4

Contents

Documentation and Tutorials


KDE 3 and PyKDE 3

Documentation and tutorials for the older PyQt and PyKDE 3.

  • Python-Qt tutorial
    In this tutorial, the basic steps of creating a Qt-based application with PyQt are explained.

Further reading and information

Applications using PyKDE


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal