diff options
Diffstat (limited to 'languages/python')
58 files changed, 4711 insertions, 0 deletions
diff --git a/languages/python/Makefile.am b/languages/python/Makefile.am new file mode 100644 index 00000000..ddebc35d --- /dev/null +++ b/languages/python/Makefile.am @@ -0,0 +1,31 @@ +# Here resides the Python support part. +# Do not confuse this with the python part responsible for KDevelop scripting + +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/languages/lib/designer_integration \ + -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_builddir)/languages/lib/designer_integration \ + $(all_includes) +SUBDIRS = app_templates file_templates doc + + +kde_module_LTLIBRARIES = libkdevpythonsupport.la kio_pydoc.la + +libkdevpythonsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpythonsupport_la_LIBADD = $(top_builddir)/lib/libkdevelop.la \ + $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la +libkdevpythonsupport_la_SOURCES = pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui \ + pythonimplementationwidget.cpp qtdesignerpythonintegration.cpp + +kio_pydoc_la_SOURCES = pydoc.cpp +kio_pydoc_la_LIBADD = $(LIB_KIO) +kio_pydoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) + +METASOURCES = AUTO + +slavedir = $(kde_datadir)/kio_pydoc +slave_DATA = kde_pydoc.py + +servicedir = $(kde_servicesdir) +service_DATA = kdevpythonsupport.desktop pydoc.protocol + +rcdir = $(kde_datadir)/kdevpythonsupport +rc_DATA = kdevpythonsupport.rc diff --git a/languages/python/README.dox b/languages/python/README.dox new file mode 100644 index 00000000..77d0f44c --- /dev/null +++ b/languages/python/README.dox @@ -0,0 +1,48 @@ +/** \class PythonSupportPart +This is a Python support plugin. + +Put a more detailed description of your part in these lines. It can span +over several lines. You can even use some html commands in these lines like: +<code>This is code</code>, html links <a href="http://somelocation">link text</a>, +and images. + +\authors <a href="mailto:bernd AT kdevelop.org">Bernd Gehrmann</a> + +\maintainer <a href="mailto:$EMAIL$">$AUTHOR$</a> +\maintainer <a href="mailto:2nd maintainer AT provider.com">2nd maintainer full name</a> +... +\maintainer <a href="mailto:nth maintainer AT provider.com">nth maintainer full name</a> + +\feature Python support +\feature Consult \ref LangSupportStatus for a up to date features/status of this programming language support part. + +\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. +.. +\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. + +\requirement Describe a the 1st requirement of your part. +\requirement Describe a the 2nd requirement of your part. +... +\requirement Describe a the nth requirement of your part. + +\todo Describe a the 1st TODO of your part. +\todo Describe a the 2nd TODO of your part. +... +\todo Describe a the nth TODO of your part. + +\faq <b>First frequenly asked question about your part ?</b> Answer. +\faq <b>Second frequenly asked question about your part ?</b> Answer. +... +\faq <b>Last frequenly asked question about your part ?</b> Answer. + +\note First note text. +\note Second note text. +... +\note Last note text. + +\warning First warning text. +\warning Second warning text. +... +\warning Last warning text. + +*/ diff --git a/languages/python/app_templates/Makefile.am b/languages/python/app_templates/Makefile.am new file mode 100644 index 00000000..1ca030e1 --- /dev/null +++ b/languages/python/app_templates/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = pythonhello pytk pyqt +profilesdir = $(kde_datadir)/kdevelop/profiles/IDE/ScriptingLanguageIDE/PythonIDE +profiles_DATA = python.appwizard diff --git a/languages/python/app_templates/pyqt/.kdev_ignore b/languages/python/app_templates/pyqt/.kdev_ignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pyqt/.kdev_ignore diff --git a/languages/python/app_templates/pyqt/Makefile.am b/languages/python/app_templates/pyqt/Makefile.am new file mode 100644 index 00000000..ea9502cc --- /dev/null +++ b/languages/python/app_templates/pyqt/Makefile.am @@ -0,0 +1,20 @@ +dataFiles = app.py app.kdevelop fileopen.pyxpm fileprint.pyxpm \ + filesave.pyxpm app-Makefile.am app-autogen.sh app-configure.ac \ + documentdetails.ui missing install-sh mkinstalldirs \ + pyqt-am-preproc.py templates-ui-dialog templates-ui-mainwin \ + pyqt.png +templateName = pyqt + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz
\ No newline at end of file diff --git a/languages/python/app_templates/pyqt/app-Makefile.am b/languages/python/app_templates/pyqt/app-Makefile.am new file mode 100644 index 00000000..78df3505 --- /dev/null +++ b/languages/python/app_templates/pyqt/app-Makefile.am @@ -0,0 +1,14 @@ + +EXEEXT= + +pyui_files= documentdetails.py + +%.py : %.ui + pyuic $< >$@ + + +bin_PROGRAMS = %{APPNAMELC} +%{APPNAMELC}_SOURCES = %{APPNAMELC}.py documentdetails.ui + +%{APPNAMELC}$(EXEEXT): $(pyui_files) + echo "Done" diff --git a/languages/python/app_templates/pyqt/app-autogen.sh b/languages/python/app_templates/pyqt/app-autogen.sh new file mode 100644 index 00000000..b380ddfd --- /dev/null +++ b/languages/python/app_templates/pyqt/app-autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +echo "Running aclocal" +aclocal +echo "Running autoconf" +autoconf +echo "Processing Makefile.am" +python pyqt-am-preproc.py +echo "Running automake" +automake +echo "Done." diff --git a/languages/python/app_templates/pyqt/app-configure.ac b/languages/python/app_templates/pyqt/app-configure.ac new file mode 100644 index 00000000..62903c0f --- /dev/null +++ b/languages/python/app_templates/pyqt/app-configure.ac @@ -0,0 +1,32 @@ + +AC_INIT +AM_INIT_AUTOMAKE(testprog,[0.1]) + +AC_PROG_MAKE_SET + +# python interpreter check +AC_PATH_PROG([PYTHON],[python]) +if test -z "${PYTHON}" ; then + AC_MSG_ERROR([you need Python to use this program]) +fi + +# PyQT check +AC_MSG_CHECKING([whether PyQT can be used by Python]) +pyqt_present=no +cat >pyqttest.py <<END +import qt +END +${PYTHON} pyqttest.py >/dev/null 2>&1 && pyqt_present=yes +AC_MSG_RESULT([$pyqt_present]) + +# pyuic check +AC_PATH_PROG([PYUIC],[pyuic]) +if test -z "${PYUIC}" ; then + AC_MSG_ERROR([cannot find pyuic (part of the PyQT package)]) +fi +AC_SUBST([PYUIC]) +AC_SUBST([PYTHON]) + +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT diff --git a/languages/python/app_templates/pyqt/app.kdevelop b/languages/python/app_templates/pyqt/app.kdevelop new file mode 100644 index 00000000..a8fb1726 --- /dev/null +++ b/languages/python/app_templates/pyqt/app.kdevelop @@ -0,0 +1,81 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevAutoProject</projectmanagement> + <primarylanguage>Python</primarylanguage> + <keywords> + <keyword>Python</keyword> + <keyword>qt</keyword> + </keywords> + <ignoreparts/> + </general> + <kdevautoproject> + <general> + <activedir/> + </general> + <run> + <mainprogram>./%{APPNAMELC}.py</mainprogram> + </run> + </kdevautoproject> + <kdevdoctreeview> + <ignoretocs> + <toc>ada</toc> + <toc>ada_bugs_gcc</toc> + <toc>bash</toc> + <toc>bash_bugs</toc> + <toc>c++_bugs_gcc</toc> + <toc>clanlib</toc> + <toc>w3c-dom-level2-html</toc> + <toc>fortran_bugs_gcc</toc> + <toc>gnome1</toc> + <toc>gnustep</toc> + <toc>gtk</toc> + <toc>gtk_bugs</toc> + <toc>haskell</toc> + <toc>haskell_bugs_ghc</toc> + <toc>java_bugs_gcc</toc> + <toc>java_bugs_sun</toc> + <toc>libc</toc> + <toc>libstdc++</toc> + <toc>opengl</toc> + <toc>pascal_bugs_fp</toc> + <toc>php</toc> + <toc>php_bugs</toc> + <toc>perl</toc> + <toc>perl_bugs</toc> + <toc>ruby</toc> + <toc>ruby_bugs</toc> + <toc>sdl</toc> + <toc>stl</toc> + <toc>w3c-svg</toc> + <toc>sw</toc> + <toc>w3c-uaag10</toc> + <toc>wxwidgets_bugs</toc> + </ignoretocs> + <ignoreqt_xml> + <toc>qmake User Guide</toc> + </ignoreqt_xml> + <ignoredoxygen> + <toc>KDE Libraries (Doxygen)</toc> + </ignoredoxygen> + </kdevdoctreeview> + <kdevfileview> + <tree> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + </tree> + <groups> + <group pattern="*.py" name="Python files" /> + <group pattern="*.ui" name="QT Designer files" /> + </groups> + </kdevfileview> + <kdevfilecreate> + <useglobaltypes> + <type ext="py"/> + <type ext="ui"/> + </useglobaltypes> + </kdevfilecreate> +</kdevelop> diff --git a/languages/python/app_templates/pyqt/app.py b/languages/python/app_templates/pyqt/app.py new file mode 100644 index 00000000..ede8dc54 --- /dev/null +++ b/languages/python/app_templates/pyqt/app.py @@ -0,0 +1,271 @@ +#!/usr/bin/env python + +############################################################################# +# %{APPNAME} - PyQT application template for KDevelop +# +# Translated from C++ qmakeapp.cpp +# (qmakeapp.cpp - Copyright (C) 1992-2002 Trolltech AS. All rights reserved.) +# +# This file is part of an example program for Qt. This example +# program may be used, distributed and modified without limitation. +# +############################################################################# + +import sys +import os.path +from qt import * + +import documentdetails + +false = 0 +true = 1 + +def load_QPixMap(fileName): + f = open(os.path.join(sys.path[0],fileName),"r") + result = QPixmap(f.readlines()) + f.close() + return result + +class %{APPNAME}(QMainWindow): + """An application called %{APPNAME}.""" + + def __init__(self): + QMainWindow.__init__(self, None, "%{APPNAME}") + self.initIcons() + self.setup() + self.initPrinter() + self.initToolBar() + self.initMenu() + self.initMainWidget() + self.setCaption(self.appTitle) + + def setup(self): + + self.appTitle = "%{APPNAME} - PyQT Application Example" + + self.menu = [ + ('&File', + [('&New', self.slotNewFile), + ('&Open...', self.slotOpenFile, self.openIcon), + ('&Save', self.slotSaveFile, self.saveIcon), + ('Save &as...', self.slotSaveAs), + ('&Print...', self.slotPrint, self.printIcon), + ('&Edit details...', self.slotEditDetails), + (None,)]), + ('&Help', + [('&About', self.slotAbout), + ('About &QT', self.slotAboutQT), + (None, ), + ('What\'s this', self.slotWhatsThis)]) + ] + + self.toolbar = [ + ("filetools", "file operations", "File Operations", + [("fileopen", + (self.openIcon, "open file", "Open File", self.slotOpenFile), + "<p>Click this button to open a <em>new file</em>. <br>" + \ + "You can also select the <b>Open</b> command " + \ + "from the <b>File</b> menu.</p>"), + ("filesave", + (self.saveIcon, "save file", "Save File", self.slotSaveFile), + "<p>Click this button to save the file you " + \ + "are editing. You will be prompted for a file name.\n" + \ + "You can also select the <b>Save</b> command " + \ + "from the <b>File</b> menu.</p>"), + ("fileprint", + (self.printIcon, "print file", "Print File", self.slotPrint), + "Click this button to print the file you " + \ + "are editing.\n You can also select the Print " + \ + "command from the File menu." + )])] + + self.fileName = "" + + + def initMainWidget(self): + self.editor = QTextEdit(self, "editor") + self.editor.setFocus() + self.setCentralWidget(self.editor) + self.statusBar().message("Ready", 2000) + self.resize(450,600) + + def initPrinter(self): + self.printer = QPrinter() + + def initIcons(self): + self.openIcon = QIconSet( load_QPixMap("fileopen.pyxpm")) + self.saveIcon = QIconSet( load_QPixMap("filesave.pyxpm")) + self.printIcon = QIconSet( load_QPixMap("fileprint.pyxpm")) + + def initToolBar(self): + + self.toolbars = {} + for (toolBarID, toolBarName, toolBarDescr, toolBarButtons) in self.toolbar: + self.toolbars[toolBarID] = QToolBar(self, toolBarName) + self.toolbars[toolBarID].setLabel(toolBarDescr) + for (buttonID, (buttonIcon, buttonName, buttonText, buttonSlot), whatsThisText) in toolBarButtons: + toolButton = QToolButton(buttonIcon, buttonText, "", buttonSlot, self.toolbars[toolBarID], buttonName) + QWhatsThis.add( toolButton, whatsThisText ) + self.whatsThisButton = QWhatsThis.whatsThisButton(self.toolbars[toolBarID]) + + + def initMenu(self): + + for (menuName, subMenu) in self.menu: + menu = QPopupMenu(self) + self.menuBar().insertItem( menuName, menu ) + for menuOption in subMenu: + if len(menuOption)==1: + menu.insertSeparator() + elif len(menuOption)==2: + menu.insertItem( menuOption[0], menuOption[1] ) + elif len(menuOption)==3: + menu.insertItem( menuOption[2], \ + menuOption[0], \ + menuOption[1] ) + + + + def slotNewFile(self): + ed = %{APPNAME}() + ed.setCaption(self.appTitle) + ed.show() + + def slotOpenFile(self): + fileName = str(QFileDialog.getOpenFileName("", "", self)) + print fileName + if not fileName=="": + self.load(fileName) + else: + self.statusBar().message("Loading aborted", 2000) + + def slotSaveFile(self): + if self.fileName=="": + self.saveAs() + return + self.save() + + + def slotSaveAs(self): + pass + + def slotPrint(self): + margin = 10 + pageno = 1 + if self.printer.setup(self): + self.statusBar().message("Printing..."); + p = QPainter() + if not p.begin(self.printer): return + + p.setFont( self.editor.font() ) + yPos = 0 + fontMetrics = p.fontMetrics() + metrics = QPaintDeviceMetrics(self.printer) + for i in range(self.editor.lines()): + if margin + yPos > metrics.height() - margin: + pageNo += 1 + self.statusBar().message("Printing (page " + pageNo + ")...") + self.printer.newPage() + yPos = 0 + p.drawText( margin, margin+yPos, \ + metrics.width(), \ + fontMetrics.lineSpacing(), \ + QPainter.ExpandTabs | QPainter.DontClip, \ + self.editor.text(i) ) + yPos += fontMetrics.lineSpacing() + p.end() + self.statusBar().message("Printing completed", 2000) + else: + self.statusBar().message("Printing aborted", 2000) + + def slotClose(self): + pass + + def slotQuit(self): + pass + + def slotEditDetails(self): + docDet = documentdetails.documentDetails(self) + docDet.show() + + def slotWhatsThis(self): + self.whatsThis() + + def slotAbout(self): + QMessageBox.about(self, self.appTitle, \ + "This example demonstrates the simple use of\n" + \ + "QMainWindow, QMenuBar and QToolBar using QT\n" + \ + "and Python.") + + def slotAboutQT(self): + QMessageBox.aboutQt(self, self.appTitle) + + def load(self,fileName): + f = open(fileName,"r") + if f: + self.editor.setText( f.read() ) + self.editor.setModified(false) + self.setCaption(fileName) + self.statusBar().message("Loaded document " + fileName, 2000) + self.fileName = fileName + else: + self.statusBar().message("Could not load " + fileName, 5000) + return + + def saveAs(self): + fileName = str(QFileDialog.getSaveFileName(None, None, self)) + if fileName!="": + self.fileName = fileName + self.save() + else: + self.statusBar().message("Saving aborted", 2000) + + def save(self): + if self.fileName=="": + self.saveAs() + return + text = str(self.editor.text()) + try: + f = open(self.fileName, "w") + f.write(text) + except: + self.statusBar().message("Could not write to " + self.fileName) + f.close() + return + f.close() + self.editor.setModified(false) + self.setCaption(self.fileName) + self.statusBar().message( "File " + self.fileName + " saved", 2000) + + def closeEvent(self, closeEvent): + if not self.editor.isModified(): + closeEvent.accept() + return + + yesNoCancel = QMessageBox.information(self, self.appTitle, + "Do you want to save the changes\n" + \ + "to the document?", \ + "Yes", "No", "Cancel", + 0, 1) + if yesNoCancel == 0: + self.save() + closeEvent.accept() + elif yesNoCancel == 1: + closeEvent.accept() + else: + closeEvent.ignore() + + + + +def main(args): + app=QApplication(args) + mainWindow = %{APPNAME}() + mainWindow.show() + app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) + app.exec_loop() + + + +if __name__ == "__main__": + main(sys.argv) diff --git a/languages/python/app_templates/pyqt/documentdetails.ui b/languages/python/app_templates/pyqt/documentdetails.ui new file mode 100644 index 00000000..130d30ef --- /dev/null +++ b/languages/python/app_templates/pyqt/documentdetails.ui @@ -0,0 +1,80 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>documentDetails</class> +<widget class="QDialog"> + <property name="name"> + <cstring>documentDetails</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>561</width> + <height>555</height> + </rect> + </property> + <property name="caption"> + <string>Document Details</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Enter details about this document below.</string> + </property> + <property name="textFormat"> + <enum>PlainText</enum> + </property> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>groupBox1</cstring> + </property> + <property name="title"> + <string>Author</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string>Name:</string> + </property> + </widget> + <widget class="QLineEdit" row="0" column="1"> + <property name="name"> + <cstring>lineEdit1</cstring> + </property> + </widget> + </grid> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>groupBox2</cstring> + </property> + <property name="title"> + <string>Company</string> + </property> + </widget> + </vbox> +</widget> +<includes> +</includes> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/languages/python/app_templates/pyqt/fileopen.pyxpm b/languages/python/app_templates/pyqt/fileopen.pyxpm new file mode 100644 index 00000000..e90fcfee --- /dev/null +++ b/languages/python/app_templates/pyqt/fileopen.pyxpm @@ -0,0 +1,19 @@ + 16 13 5 1 +. c #040404 +# c #808304 +a c None +b c #f3f704 +c c #f3f7f3 +aaaaaaaaa...aaaa +aaaaaaaa.aaa.a.a +aaaaaaaaaaaaa..a +a...aaaaaaaa...a +.bcb.......aaaaa +.cbcbcbcbc.aaaaa +.bcbcbcbcb.aaaaa +.cbcb........... +.bcb.#########.a +.cb.#########.aa +.b.#########.aaa +..#########.aaaa +...........aaaaa diff --git a/languages/python/app_templates/pyqt/fileprint.pyxpm b/languages/python/app_templates/pyqt/fileprint.pyxpm new file mode 100644 index 00000000..26f3ca9d --- /dev/null +++ b/languages/python/app_templates/pyqt/fileprint.pyxpm @@ -0,0 +1,21 @@ + 16 14 6 1 +. c #000000 +# c #848284 +a c #c6c3c6 +b c #ffff00 +c c #ffffff +d c None +ddddd.........dd +dddd.cccccccc.dd +dddd.c.....c.ddd +ddd.cccccccc.ddd +ddd.c.....c....d +dd.cccccccc.a.a. +d..........a.a.. +.aaaaaaaaaa.a.a. +.............aa. +.aaaaaa###aa.a.d +.aaaaaabbbaa...d +.............a.d +d.aaaaaaaaa.a.dd +dd...........ddd diff --git a/languages/python/app_templates/pyqt/filesave.pyxpm b/languages/python/app_templates/pyqt/filesave.pyxpm new file mode 100644 index 00000000..3f28c25d --- /dev/null +++ b/languages/python/app_templates/pyqt/filesave.pyxpm @@ -0,0 +1,19 @@ + 14 14 4 1 +. c #040404 +# c #808304 +a c #bfc2bf +b c None +.............. +.#.aaaaaaaa.a. +.#.aaaaaaaa... +.#.aaaaaaaa.#. +.#.aaaaaaaa.#. +.#.aaaaaaaa.#. +.#.aaaaaaaa.#. +.##........##. +.############. +.##.........#. +.##......aa.#. +.##......aa.#. +.##......aa.#. +b............. diff --git a/languages/python/app_templates/pyqt/install-sh b/languages/python/app_templates/pyqt/install-sh new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pyqt/install-sh diff --git a/languages/python/app_templates/pyqt/missing b/languages/python/app_templates/pyqt/missing new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pyqt/missing diff --git a/languages/python/app_templates/pyqt/mkinstalldirs b/languages/python/app_templates/pyqt/mkinstalldirs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pyqt/mkinstalldirs diff --git a/languages/python/app_templates/pyqt/pyqt b/languages/python/app_templates/pyqt/pyqt new file mode 100644 index 00000000..24b1b72f --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt @@ -0,0 +1,10 @@ +# KDE Config file +[General] +Name=Python Qt application +Name[fr]=Une application Qt avec PYTHON +Icon=pyqt.png +Category=Python +Comment=This generates an application framework using Python and Qt +Comment[fr]=Génère un squelette d'application Qt dans le language PYTHON. +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=APPNAMELC.py diff --git a/languages/python/app_templates/pyqt/pyqt-am-preproc.py b/languages/python/app_templates/pyqt/pyqt-am-preproc.py new file mode 100644 index 00000000..dda5e2c3 --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt-am-preproc.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +# Preprocess Makefile.am for PyQT project +# Julian Rockey 2002 + +# TODO: +# Test real_lines properly +# Process Makefile.am's in sub-directories + +from __future__ import generators +import sys +import re + +# function to convert list of lists with continuation chars +# (bashslashes) to list of actual lines +def real_lines(m): + while len(m)>0: + result = "" + if m[0][-1]=='\\': + while (len(m)>0 and m[0][-1]=='\\'): + result += m[0][:-1] + m=m[1:] + if len(m)>0: + result += m[0] + m=m[1:] + yield result + +# check for arguments +if len(sys.argv)<2: + makefile_am = "Makefile.am" +else: + makefile_am = sys.argv[1] + + +# read in Makefile.am +f = open(makefile_am,"r") +mf = f.readlines() +f.close() + +# parse for variables +re_variable = re.compile("^(#kdevelop:[ \t]*)?([A-Za-z][A-Za-z0-9_]*)[ \t]*:?=[ \t]*(.*)$") +variables = {} + + +for l in real_lines(mf): + m = re_variable.match(l) + if m!=None: + (nowt, lhs, rhs) = m.groups() + variables[lhs]=rhs + +# look for app sources +for (var,data) in variables.items(): + spl = var.split("_",1) + spl.append("") + (prefix,primary) = (spl[0], spl[1]) + if primary=="PROGRAMS": + target=data + if variables.has_key(target + "_SOURCES"): + sources = variables[target+"_SOURCES"].split() + +# change .ui into .py +py_sources = [] +for s in sources: + py_sources.append(re.sub("\.ui$",".py",s)) + +# replace dependencies of main target with list of .py sources +# FIXME escape target +re_maintarget = re.compile("(" + target + ".*?:).*") +out = [] +for l in mf: + m = re_maintarget.match(l) + if m!=None: + (tar,)=m.groups() + l=tar + " " + " ".join(py_sources) + "\n" + out.append(l) + +# backup existing Makefile.am +f = open(makefile_am + "~", "w") +f.writelines(mf) +f.close() + +# write file +f = open(makefile_am, "w") +f.writelines(out) +f.close() diff --git a/languages/python/app_templates/pyqt/pyqt.kdevtemplate b/languages/python/app_templates/pyqt/pyqt.kdevtemplate new file mode 100644 index 00000000..bffbcd8c --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt.kdevtemplate @@ -0,0 +1,168 @@ +# KDE Config File +[General] +Name=Python Qt application +Name[ca]=Aplicació per a Qt en Python +Name[da]=Python Qt program +Name[de]=Python/Qt-Anwendung +Name[el]=ΕφαÏμογή Python Qt +Name[es]=Aplicación Qt en Python +Name[et]=Pythoni Qt rakendus +Name[eu]=Python Qt aplikazioa +Name[fa]=کاربرد پیتون Qt +Name[fr]=Application Qt Python +Name[ga]=Feidhmchlár Qt Python +Name[gl]=Aplicación Qt en Python +Name[hu]=Python/Qt-alapú alkalmazás +Name[it]=Applicazione Qt Python +Name[ja]=Python Qt アプリケーション +Name[nds]=Python Qt-Programm +Name[ne]=पाइथोन कà¥à¤¯à¥‚ टी अनà¥à¤ªà¥à¤°à¤¯à¥‹à¤— +Name[nl]=Python Qt-toepassing +Name[pl]=Program Qt w Pythonie +Name[pt]=Aplicação Qt em Python +Name[pt_BR]=Aplicação Qt em Python +Name[ru]=Приложение Qt на Python +Name[sk]=Python Qt aplikácia +Name[sr]=Python-Qt програм +Name[sr@Latn]=Python-Qt program +Name[sv]=Python Qt-program +Name[tr]=Python Qt Uygulaması +Name[zh_CN]=Python Qt åº”ç”¨ç¨‹åº +Name[zh_TW]=Python Qt æ‡‰ç”¨ç¨‹å¼ +Icon=pyqt.png +Category=Python +Comment=This generates an application framework using Python and Qt +Comment[ca]=Genera una infraestructura d'aplicació usant Python i Qt +Comment[da]=Dette genererer et programskelet ved brug af Python og Qt +Comment[de]=Hiermit wird ein Anwendungsgerüst unter Verwendung von Python und Qt erstellt +Comment[el]=Αυτό δημιουÏγεί Îνα πλαίσιο εφαÏμογής χÏησιμοποιώντας τις Python και Qt +Comment[es]=Genera una infraestructura de aplicación que usa Python y Qt +Comment[et]=Rakenduse raamistiku loomine Pythoni ja Qt abil +Comment[eu]=Honek Python eta Qt darabiltzan aplikazioen lan-marko bat sortzen du +Comment[fa]=یک چارچوب کاربرد با استÙاده از پیتون Ùˆ Qt تولید می‌کند +Comment[fr]=Génère une infrastructure d'application utilisant Python et Qt +Comment[ga]=CruthaÃonn sé seo creatlach feidhmchláir le Python agus Qt +Comment[gl]=Isto xera un contorno de traballo para unha aplicación usando Python e Qt +Comment[hu]=Létrehoz egy alkalmazás-keretrendszert Python nyelven, a Qt felhasználásával +Comment[it]=Genera l'infrastruttura applicativa usando Python e Qt +Comment[ja]=Python 㨠Qt を使ã£ã¦ã‚¢ãƒ—リケーションフレームワークを作æˆã—ã¾ã™ +Comment[nds]=Dit stellt mit Python un Qt en Programmrahmenwark op. +Comment[ne]=यसले पाइथोन र कà¥à¤¯à¥‚ टी पà¥à¤°à¤¯à¥‹à¤— गरेर अनà¥à¤ªà¥à¤°à¤¯à¥‹à¤— फà¥à¤°à¥‡à¤®à¤µà¤°à¥à¤• उतà¥à¤ªà¤¨à¥à¤¨ गरà¥à¤¦à¤› +Comment[nl]=Dit genereert een toepassingsframework met behulp van Python en Qt +Comment[pl]=Generuje szablon programu używajÄ…cego Pythona i Qt +Comment[pt]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[pt_BR]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[ru]=Создание Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Qt на Python +Comment[sk]=Vygeneruje aplikaÄný framework použÃvajúci Python a Qt +Comment[sr]=Прави радни оквир програма кориÑтећи Python и Qt +Comment[sr@Latn]=Pravi radni okvir programa koristeći Python i Qt +Comment[sv]=Detta skapar ett programramverk med användning av Python och Qt +Comment[tr]=Bu Python ve Qt kullanan bir uygulama çatısı yaratır. +Comment[zh_CN]=这将生æˆä¸€ä¸ªä½¿ç”¨ Python å’Œ Qt 的应用程åºæ¡†æž¶ +Comment[zh_TW]=產生一個使用 Python 與 Qt 的應用程å¼æ¡†æž¶ +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pyqt.tar.gz + +[GNU] +Type=include +File=%{kdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.kdevelop +Dest=%{dest}/%{APPNAMELC}.kdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/documentdetails.ui +Dest=%{dest}/documentdetails.ui + +[FILE4] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE5] +Type=install +Source=%{src}/app-configure.ac +Dest=%{dest}/configure.ac + +[FILE6] +Type=install +Source=%{src}/app-autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/mkinstalldirs +Dest=%{dest}/mkinstalldirs + +[FILE8] +Type=install +Source=%{src}/missing +Dest=%{dest}/missing + +[FILE9] +Type=install +Source=%{src}/install-sh +Dest=%{dest}/install-sh + +[FILE10] +Type=install +Source=%{src}/pyqt-am-preproc.py +Dest=%{dest}/pyqt-am-preproc.py + +[FILE11] +Type=install +Source=%{src}/fileopen.pyxpm +Dest=%{dest}/fileopen.pyxpm + +[FILE12] +Type=install +Source=%{src}/fileprint.pyxpm +Dest=%{dest}/fileprint.pyxpm + +[FILE13] +Type=install +Source=%{src}/filesave.pyxpm +Dest=%{dest}/filesave.pyxpm + +[MSG] +Type=message +Comment=A Python Qt application was created in %{dest} +Comment[ca]=Una aplicació per a Qt en Python ha estat creada en %{dest} +Comment[da]=Et Python Qt program blev oprettet i %{dest} +Comment[de]=Eine Python/Qt-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαÏμογή Python Qt δημιουÏγήθηκε στο %{dest} +Comment[es]=Una aplicación Qt en Python ha sido creada en %{dest} +Comment[et]=Pythoni Qt rakendus loodi asukohta %{dest} +Comment[eu]=Python eta Qt darabiltzan aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد پیتون Qt در %{dest} ایجاد شد +Comment[fr]=Une application Qt Python a été créée dans %{dest} +Comment[ga]=CruthaÃodh feidhmchlár Python Qt i %{dest} +Comment[gl]=Creouse unha aplicación Qt en Python en %{dest} +Comment[hu]=Létrejött egy Python/Qt-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qt Python in %{dest} +Comment[ja]=Python Qt アプリケーションを %{dest} ã«ä½œæˆã—ã¾ã—㟠+Comment[nds]=In %{dest} wöör en Python-Qt-Programm opstellt. +Comment[ne]=पाइथोन कà¥à¤¯à¥‚ टी अनà¥à¤ªà¥à¤°à¤¯à¥‹à¤— %{dest} मा सिरà¥à¤œà¤¨à¤¾ गरियो +Comment[nl]=Een Python Qt-toepassing is aangemaakt in %{dest} +Comment[pl]=Program używajÄ…cy Pythona i Qt zostaÅ‚ utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[ru]=Приложение Qt на Python Ñоздано в %{dest} +Comment[sk]=Python Qt aplikácia bola vytvorená v %{dest} +Comment[sr]= Python-Qt програм је направљен у %{dest} +Comment[sr@Latn]= Python-Qt program je napravljen u %{dest} +Comment[sv]=Ett Python Qt-program skapades i %{dest} +Comment[tr]=Bir Python Qt uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Python Qt åº”ç”¨ç¨‹åº +Comment[zh_TW]=一個 Python Qt 應用程å¼å·²å»ºç«‹æ–¼ %{dest} diff --git a/languages/python/app_templates/pyqt/pyqt.png b/languages/python/app_templates/pyqt/pyqt.png Binary files differnew file mode 100644 index 00000000..207b942f --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt.png diff --git a/languages/python/app_templates/pyqt/templates-ui-dialog b/languages/python/app_templates/pyqt/templates-ui-dialog new file mode 100644 index 00000000..fc2aefce --- /dev/null +++ b/languages/python/app_templates/pyqt/templates-ui-dialog @@ -0,0 +1,20 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>Form1</class> +<widget class="QDialog"> + <property name="name"> + <cstring>Form1</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>480</height> + </rect> + </property> + <property name="caption"> + <string>Form1</string> + </property> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/languages/python/app_templates/pyqt/templates-ui-mainwin b/languages/python/app_templates/pyqt/templates-ui-mainwin new file mode 100644 index 00000000..854da009 --- /dev/null +++ b/languages/python/app_templates/pyqt/templates-ui-mainwin @@ -0,0 +1,436 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>Form1</class> +<widget class="QMainWindow"> + <property name="name"> + <cstring>Form1</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>480</height> + </rect> + </property> + <property name="caption"> + <string>Form1</string> + </property> +</widget> +<menubar> + <property name="name"> + <cstring>menubar</cstring> + </property> + <item text="&File" name="fileMenu"> + <action name="fileNewAction"/> + <action name="fileOpenAction"/> + <action name="fileSaveAction"/> + <action name="fileSaveAsAction"/> + <separator/> + <action name="filePrintAction"/> + <separator/> + <action name="fileExitAction"/> + </item> + <item text="&Edit" name="editMenu"> + <action name="editUndoAction"/> + <action name="editRedoAction"/> + <separator/> + <action name="editCutAction"/> + <action name="editCopyAction"/> + <action name="editPasteAction"/> + <separator/> + <action name="editFindAction"/> + </item> + <item text="&Help" name="helpMenu"> + <action name="helpContentsAction"/> + <action name="helpIndexAction"/> + <separator/> + <action name="helpAboutAction"/> + </item> +</menubar> +<toolbars> +</toolbars> +<actions> + <action> + <property name="name"> + <cstring>fileNewAction</cstring> + </property> + <property name="iconSet"> + <iconset>image0</iconset> + </property> + <property name="text"> + <string>New</string> + </property> + <property name="menuText"> + <string>&New</string> + </property> + <property name="accel"> + <string>Ctrl+N</string> + </property> + </action> + <action> + <property name="name"> + <cstring>fileOpenAction</cstring> + </property> + <property name="iconSet"> + <iconset>image1</iconset> + </property> + <property name="text"> + <string>Open</string> + </property> + <property name="menuText"> + <string>&Open...</string> + </property> + <property name="accel"> + <string>Ctrl+O</string> + </property> + </action> + <action> + <property name="name"> + <cstring>fileSaveAction</cstring> + </property> + <property name="iconSet"> + <iconset>image2</iconset> + </property> + <property name="text"> + <string>Save</string> + </property> + <property name="menuText"> + <string>&Save</string> + </property> + <property name="accel"> + <string>Ctrl+S</string> + </property> + </action> + <action> + <property name="name"> + <cstring>fileSaveAsAction</cstring> + </property> + <property name="text"> + <string>Save As</string> + </property> + <property name="menuText"> + <string>Save &As...</string> + </property> + <property name="accel"> + <string></string> + </property> + </action> + <action> + <property name="name"> + <cstring>filePrintAction</cstring> + </property> + <property name="iconSet"> + <iconset>image3</iconset> + </property> + <property name="text"> + <string>Print</string> + </property> + <property name="menuText"> + <string>&Print...</string> + </property> + <property name="accel"> + <string>Ctrl+P</string> + </property> + </action> + <action> + <property name="name"> + <cstring>fileExitAction</cstring> + </property> + <property name="text"> + <string>Exit</string> + </property> + <property name="menuText"> + <string>E&xit</string> + </property> + <property name="accel"> + <string></string> + </property> + </action> + <action> + <property name="name"> + <cstring>editUndoAction</cstring> + </property> + <property name="iconSet"> + <iconset>image4</iconset> + </property> + <property name="text"> + <string>Undo</string> + </property> + <property name="menuText"> + <string>&Undo</string> + </property> + <property name="accel"> + <string>Ctrl+Z</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editRedoAction</cstring> + </property> + <property name="iconSet"> + <iconset>image5</iconset> + </property> + <property name="text"> + <string>Redo</string> + </property> + <property name="menuText"> + <string>&Redo</string> + </property> + <property name="accel"> + <string>Ctrl+Y</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editCutAction</cstring> + </property> + <property name="iconSet"> + <iconset>image6</iconset> + </property> + <property name="text"> + <string>Cut</string> + </property> + <property name="menuText"> + <string>&Cut</string> + </property> + <property name="accel"> + <string>Ctrl+X</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editCopyAction</cstring> + </property> + <property name="iconSet"> + <iconset>image7</iconset> + </property> + <property name="text"> + <string>Copy</string> + </property> + <property name="menuText"> + <string>C&opy</string> + </property> + <property name="accel"> + <string>Ctrl+C</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editPasteAction</cstring> + </property> + <property name="iconSet"> + <iconset>image8</iconset> + </property> + <property name="text"> + <string>Paste</string> + </property> + <property name="menuText"> + <string>&Paste</string> + </property> + <property name="accel"> + <string>Ctrl+V</string> + </property> + </action> + <action> + <property name="name"> + <cstring>editFindAction</cstring> + </property> + <property name="iconSet"> + <iconset>image9</iconset> + </property> + <property name="text"> + <string>Find</string> + </property> + <property name="menuText"> + <string>&Find...</string> + </property> + <property name="accel"> + <string>Ctrl+F</string> + </property> + </action> + <action> + <property name="name"> + <cstring>helpContentsAction</cstring> + </property> + <property name="text"> + <string>Contents</string> + </property> + <property name="menuText"> + <string>&Contents...</string> + </property> + <property name="accel"> + <string></string> + </property> + </action> + <action> + <property name="name"> + <cstring>helpIndexAction</cstring> + </property> + <property name="text"> + <string>Index</string> + </property> + <property name="menuText"> + <string>&Index...</string> + </property> + <property name="accel"> + <string></string> + </property> + </action> + <action> + <property name="name"> + <cstring>helpAboutAction</cstring> + </property> + <property name="text"> + <string>About</string> + </property> + <property name="menuText"> + <string>&About</string> + </property> + <property name="accel"> + <string></string> + </property> + </action> +</actions> +<images> + <image name="image0"> + <data format="XPM.GZ" length="721">789cedd2b10ac2301405d03d5ff148b62056035241fc04c5511087f425a2432b681d44fc777ba329d6b47fe07d19dee50cc9904cd376b3229d896b6deb13131fed85b4bb95e57db75f3e8434869a93d3548e841c13d3fa5c79ecaad9d52404b540351e83caa833c6a03ad4798e41f5a86c30a816f510126ee94d14d52611fb8e2ad49070a4445ca4447ca4446ca444da07fecac7ffd2956ebe64f81ff4c873215e0583a9b0</data> + </image> + <image name="image1"> + <data format="XPM.GZ" length="691">789cad914d0ac2301085f739c5d0d915b11a140ae211149782b898448b2e5a41eb42c4bb9b9fa6a67644045f0299978f37134896c27ab5803413979aeaa3067da033a4bb6b59de36dbf95d245282d953182703910c41c3f254ed6d8da6c69193b5dada7c924b6fc9dac2c85b156c51b83eacfe41d0c89defc4dfa2dd7c37fc44b025a179043c4152a4b055f4365414ad0e8901fd94c1ae5e19441da9211c68e7f44098d3074d86019e70a0210c089958df7ffb31134fa13797a8</data> + </image> + <image name="image2"> + <data format="XPM.GZ" length="691">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022530543251d2e253d856405bffcbc54105b19c856360003103711c4b530b13082709340dc644310047193c1dcc424d314883958015846190b80ca24262a2721012087349964a030ba69c9c9303d403e9132087b68279388ecff4414193440948c32aa71d86470bb80863258a21b9a0eb0a7905a6b2e006d59a436</data> + </image> + <image name="image3"> + <data format="XPM.GZ" length="2509">789c7d944973db461085effa152cf54d956a932089a55239c896572d96bcc4b253390033186ea2488aa416a7f2dfd3db0cbd44e6d340f8f8def43406209e1c742ecf4f3b074ff6d69b7a33711d37ae6f3a077e3b9f3ffcf5f71fffeced675987fecab293edffb6b77fb1e9b8ced9e2ba65c08c00baf2117e2f5c86d02d99e196b9d7ed963df53f2ab3c47789258fa7c26564688d4bf30f23673de113e6ac1719ae9459e27f4d5c893f17ae126f8d2be3ebc87d9dff4e3904f317ccfd5ef23f28b3c45f26963c7e510ec1fc9570157dd81857967f883c90cd8635f3208b8c0b6596f863e17a500fd597fe8744c35afc1be33aef8bff5ad9b5e637cc7993f7f346fca571637c1fb9d0f99f9543b07ab2df453ff9723d0551a1f3d791cb8170573904f3a5bf725034e66f133be96fa44c1246799e4a573495e461a29cfcbbc8e64f8d9df96564f5519e876a1019668975fda05c593d5c25d67a6f945d6ef3bdb08b3ed491eba1e467c6561fcf229bff4ad9b5c6c7ccf530fa8089bdf8136596703fb1f800c23ee5ff548e3e7a636f3c8ddc68bd8ab91926066596b05c5fe359c285b2cf8de5f7ed7296f050b825d6f74763dc1a0f227bcdbf60f679e29789353f5666093f4facfe857208e63f156e93df8bdc16c223e358ff28b2f939735b240eca2ce1678983f0a57208e6bf150ec96f8d83f127e650b084cf85e5a32fdf9d10b0c6c6e44835c9631dfd9ff235b618925ad1e89779278af5750df7681ea40316d8111eef876a79ad977ae773d8257ec8efead629fdeb3ca4ba9ae6e11fcdbbef6aa72b7934ef695702eddf4e631a13d2f4c73cd599e115f533a639bbc173e6788d0b5cf23a314fe915dee01a37df698bb77887f7f8805ff190e64c342fb59fe2333ca2e373d30b7c89aff035bec1634a9e904ef1417faf78866ff1fc275de03b7c4fa3a1553e50fd8f78a2ef0bfcf43fe973bcc4cff805bb74d6a3de0e31b37c9f561fe090c6583a19612e9d1dd179417db1575237191eeafb172b9cd22a7d409a7bcc8f0c4e68f01900ef44090db8547f4ee9a966456732445083078f779a8756dfdf52f19b1cd59c699254e31c46d0703f30b6fa5239a5d27faabc22b78409de838316bdd51fd1377730a531a12bd363c949aa3d936f1a6821e8fda566aef8fe011d612eba860569495a9196721ebe7d7ed0c30dac491b58d2bd21c116b634bf25ddd2fd9dd9f3f6efef7bff0111915e41</data> + </image> + <image name="image4"> + <data format="XPM.GZ" length="661">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022630543251d2e253d856405bffcbc54105b19c8563600020b13103711c4b530b1308270f5b082019251068344848c32b23808206494a1e23015890819653db8b81e44255c0659025d460fa70c6e3d78ec814b21b90d052422fb070540f50ebaf84196a9b5e6020011bc73cc</data> + </image> + <image name="image5"> + <data format="XPM.GZ" length="661">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022630543251d2e253d856405bffcbc54103b11c8563600020b13105719c4b530b1308270f5b0027acb28278201a64c221c4084136132ca7011885c225c06c91890542256193d98a198327a386570ea49449581bb4d2f114d0624a08c230c50fd4f5cb80da04cad351700f7fd8672</data> + </image> + <image name="image6"> + <data format="XPM.GZ" length="661">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022630543251d2e253d856405bffcbc54105b19c856360003103711c6b53002abc40a90649491482ac92863955146d6822ca387474619c9301419a03842825819245bd064129513b1cb242602512216994430d44bc4904984c8c1a5e032897a3019a8144c26518f800c92715864d0ec81ab4dc4701b924fb0850e8a4cad351700fbd07ccb</data> + </image> + <image name="image7"> + <data format="XPM.GZ" length="706">789c9d92cb0ac2301045f7f98aa1d915b1da8214c44f505c0ae26226b1e8a20a5a1722febb9924a5af58c19b40e77238a1842431ecb66b881371afb03a2b5027bc41ac1f65f9dc1f562f11a52998bd80793411d114146cae9723cfd2cc7266c395ea9aa75c15d74c65aad05c35d79c727215b91636f6d860c689f40910b4e92147d840b3be39d8416d877c860eb9af478d23919c4b8a7a0ed68eb628e4a04521c7fd46c07138e47448dbf1f32fc767e8d43735741af287d3ced83b782fc5075b18a5a5</data> + </image> + <image name="image8"> + <data format="XPM.GZ" length="736">789c7d92d10a82301486eff714c3dd49649984103d42d165105dcce3465d58507611d1bbb773d674aed93f85fd7efb183ab394ef771b9e66ecdecaf60c1c4ef2c6d3fad134cfc371fd62499e7373957c9e4c5832e5c0b7d78bc2b9307331a36055ae960556c05a16656e69e5aaa5355658c202965825566d62176b57b5a64da3f188c084841e0a29a5e831910ef8885e4854501922e8a6b923586a176a8e40051ec1e63b7d0267387c6738424775091d653f98565a858e26c110447107d1886350d4a1c41c3dea7864e87c37f3ce47fc3aee7cd5207ffe90f78a7d0007c6c175</data> + </image> + <image name="image9"> + <data format="XPM.GZ" length="2798">789cb5d5594f1b491007f0773e8545bda1d53ff81a7bb4da07830103b603b92059edc34cf78c0ff0812f3051befb5677554f56c24428d2aa78e0a7aeaeea6be0dd41e9f6aa573a78b7b75c25ab91299961b2281dd8f564b2fdfb9fbfbeefed572a25fe291f46a5cafe1f7bfbd7ab9229f567d3cc81fa0caa945d785f78c72ebc2f9dabb10bef9e73ade2c21913e77ae2c28f2fc48d6a947ab7c4b169d6bc8f9ca3aa0b3fbfaf4e35ff4c5cccdf8813db34de1def34e4c3881b3cc38fb7d5a918f78525ff46dcaca9576a23a627715cd3f53e8a131b7b63edecba69fd8d3af41b1496fa6d7153f78f86b8a86f0bcbfe9ec5493d16cfc5695dfad34c6d651ca9f7cffdbd173743fd441cd64f0f85a5fe489c6a3fd4d5613c0d4eeade43b189747c1b2ce3683abbeebadf5a702ae343716c743d53313f1febc7bfa843bf1371581f9d06ebf8581df257e2b01eba57675a5fea19177e7c109cfa712271aceba58938b13a6ec4a13fba62ee27f53fa9b51fe5c1ba7f7f1f71cd85f7545cdcf73ad8f8ef137762de9fd4ef898b7e51b0d63f52877e65b10de3c785657eacced4fe7b77b763236fab36fa3e1ec5a9d5f341b0e4d3526c42bd4ab0eee7505cf4fb28ce1aea6fc146fa7f76e6d3e115fafa5d7112cebf254eeb328e6a70967b9f8b437fba13db4ceb2fc5453f7f5ffcfac2795f046bbd0fe2a2df486c42bd2bb18dd46375e89f89b99fccf7ef2dadbbf0eea8add6bf16db4cbd1067b9de8fafc7b7a1ef13cf6213e50defadd846b9acff569c3574fe833ad7fa5fc57943cfdb9f9f894cd8cf93982748fdb9386f64dee4df97c978ff52ef4c9d69ff9938cff53cfdf7ec5627f5ae576f8fdfcf0721410ac391c222fb753e720c30c408638e3bdcf31c7a3d9fb3279862c631c70316586285f5ae1e727fd8e091f3e678c216cf68e108c768e3e4957ccb2b39e5fc337470ce71814b74d143ffe59ae4ff01ae7825d7f8c0753fe213d7ff8c2ffcfb0deccefc016ef115df380e51460555d4504784069aafe48f798f87885126a04a4409a564c8be92bfc115655cb94c395a34409d8634a231afe7c58ee5ef35d7bae3dc2eddd384a634a339c7032d90efcce7bba225ad38525aa3461b7ae478da75037a5f2758d196525ec93359aedde23882a563ae95edc8cf90529b4ee894c6bcf2844f66e2ce1239cf9afc7755c5fbc9b8479fdabcc71b3aa38ee4d039d7b9a04b1ecb5ebe677ea1964712ead2f9cf8aac1ecfd10a6f79ffdc7b4d7dee92bcfd7be1bd5ff29ccedbbf2f90dbfbfffefdfef873ef5fce01d04a</data> + </image> +</images> +<connections> + <connection> + <sender>fileNewAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>fileNew()</slot> + </connection> + <connection> + <sender>fileOpenAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>fileOpen()</slot> + </connection> + <connection> + <sender>fileSaveAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>fileSave()</slot> + </connection> + <connection> + <sender>fileSaveAsAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>fileSaveAs()</slot> + </connection> + <connection> + <sender>filePrintAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>filePrint()</slot> + </connection> + <connection> + <sender>fileExitAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>fileExit()</slot> + </connection> + <connection> + <sender>editUndoAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editUndo()</slot> + </connection> + <connection> + <sender>editRedoAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editRedo()</slot> + </connection> + <connection> + <sender>editCutAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editCut()</slot> + </connection> + <connection> + <sender>editCopyAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editCopy()</slot> + </connection> + <connection> + <sender>editPasteAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editPaste()</slot> + </connection> + <connection> + <sender>editFindAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>editFind()</slot> + </connection> + <connection> + <sender>helpIndexAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>helpIndex()</slot> + </connection> + <connection> + <sender>helpContentsAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>helpContents()</slot> + </connection> + <connection> + <sender>helpAboutAction</sender> + <signal>activated()</signal> + <receiver>Form1</receiver> + <slot>helpAbout()</slot> + </connection> +</connections> +<slots> + <slot>fileNew()</slot> + <slot>fileOpen()</slot> + <slot>fileSave()</slot> + <slot>fileSaveAs()</slot> + <slot>filePrint()</slot> + <slot>fileExit()</slot> + <slot>editUndo()</slot> + <slot>editRedo()</slot> + <slot>editCut()</slot> + <slot>editCopy()</slot> + <slot>editPaste()</slot> + <slot>editFind()</slot> + <slot>helpIndex()</slot> + <slot>helpContents()</slot> + <slot>helpAbout()</slot> +</slots> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/languages/python/app_templates/python.appwizard b/languages/python/app_templates/python.appwizard new file mode 100644 index 00000000..82c13adf --- /dev/null +++ b/languages/python/app_templates/python.appwizard @@ -0,0 +1,2 @@ +[General] +List=pythonhello,pytk,pyqt diff --git a/languages/python/app_templates/pythonhello/.kdev_ignore b/languages/python/app_templates/pythonhello/.kdev_ignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pythonhello/.kdev_ignore diff --git a/languages/python/app_templates/pythonhello/Makefile.am b/languages/python/app_templates/pythonhello/Makefile.am new file mode 100644 index 00000000..3d66b1a7 --- /dev/null +++ b/languages/python/app_templates/pythonhello/Makefile.am @@ -0,0 +1,15 @@ +dataFiles = app.py app.kdevelop pythonhello.png +templateName = pythonhello +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz
\ No newline at end of file diff --git a/languages/python/app_templates/pythonhello/app.kdevelop b/languages/python/app_templates/pythonhello/app.kdevelop new file mode 100644 index 00000000..2c494d6a --- /dev/null +++ b/languages/python/app_templates/pythonhello/app.kdevelop @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<kdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevScriptProject</projectmanagement> + <primarylanguage>Python</primarylanguage> + <keywords> + <keyword>Python</keyword> + </keywords> + <ignoreparts/> + </general> + <kdevscriptproject> + <general> + <activedir></activedir> + </general> + <run> + <mainprogram>%{APPNAMELC}.py</mainprogram> + </run> + </kdevscriptproject> + <kdevdoctreeview> + <ignoretocs> + <toc>ada</toc> + <toc>ada_bugs_gcc</toc> + <toc>bash</toc> + <toc>bash_bugs</toc> + <toc>c++_bugs_gcc</toc> + <toc>clanlib</toc> + <toc>w3c-dom-level2-html</toc> + <toc>fortran_bugs_gcc</toc> + <toc>gnome1</toc> + <toc>gnustep</toc> + <toc>gtk</toc> + <toc>gtk_bugs</toc> + <toc>haskell</toc> + <toc>haskell_bugs_ghc</toc> + <toc>java_bugs_gcc</toc> + <toc>java_bugs_sun</toc> + <toc>kde2book</toc> + <toc>libc</toc> + <toc>libstdc++</toc> + <toc>opengl</toc> + <toc>pascal_bugs_fp</toc> + <toc>php</toc> + <toc>php_bugs</toc> + <toc>perl</toc> + <toc>perl_bugs</toc> + <toc>qt-kdev3</toc> + <toc>ruby</toc> + <toc>ruby_bugs</toc> + <toc>sdl</toc> + <toc>stl</toc> + <toc>w3c-svg</toc> + <toc>sw</toc> + <toc>w3c-uaag10</toc> + <toc>wxwidgets_bugs</toc> + </ignoretocs> + <ignoreqt_xml> + <toc>Guide to the Qt Translation Tools</toc> + <toc>Qt Assistant Manual</toc> + <toc>Qt Designer Manual</toc> + <toc>Qt Reference Documentation</toc> + <toc>qmake User Guide</toc> + </ignoreqt_xml> + <ignoredoxygen> + <toc>KDE Libraries (Doxygen)</toc> + </ignoredoxygen> + </kdevdoctreeview> + <kdevfileview> + <tree> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + </tree> + <groups> + <group pattern="*.py" name="Python files" /> + </groups> + </kdevfileview> + <kdevfilecreate> + <useglobaltypes> + <type ext="py"/> + </useglobaltypes> + </kdevfilecreate> +</kdevelop> diff --git a/languages/python/app_templates/pythonhello/app.py b/languages/python/app_templates/pythonhello/app.py new file mode 100644 index 00000000..3257ce62 --- /dev/null +++ b/languages/python/app_templates/pythonhello/app.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +def main(): + print 'Hello world!' + +main() + diff --git a/languages/python/app_templates/pythonhello/pythonhello b/languages/python/app_templates/pythonhello/pythonhello new file mode 100644 index 00000000..f1a4f86b --- /dev/null +++ b/languages/python/app_templates/pythonhello/pythonhello @@ -0,0 +1,12 @@ +# KDE Config File +[General] +Name=Simple Python script +Name[fr]=Un simple script de test "Hello world" +Name[de]=Ein einfaches Python-Script "Hello world" +Icon=pythonhello.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python +Comment[fr]=Génère un simple script de test du type "Hello world" dans le language PYTHON. +Comment[de]=Es wird ein einfaches "Hello world"-Programm in Python erzeugt. +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=APPNAMELC.py diff --git a/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate b/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate new file mode 100644 index 00000000..6d52cf8a --- /dev/null +++ b/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate @@ -0,0 +1,107 @@ +# KDE Config File +[General] +Name=Simple Python script +Name[ca]=Simple script en Python +Name[da]=Simpelt Python script +Name[de]=Einfaches Python-Skript +Name[el]=Απλό σενάÏιο Python +Name[es]=Guión sencillo en Python +Name[et]=Lihtne Pythoni skript +Name[eu]=Python script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پیتون +Name[fr]=Script Python simple +Name[ga]=Script shimplà Python +Name[gl]=Script sinxelo en Python +Name[hu]=Egyszerű Python-szkript +Name[it]=Semplice script Python +Name[ja]=ç°¡å˜ãª Python スクリプト +Name[nds]=Eenfach Python-Skript +Name[ne]=साधारण पाइथोन सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ +Name[nl]=Eenvoudig Python-script +Name[pl]=Prosty skrypt w Pythonie +Name[pt]=Programa simples em Python +Name[pt_BR]=Programa simples em Python +Name[ru]=ПроÑтой Ñкрипт Python +Name[sk]=Jednoduchý Python skript +Name[sr]=ЈедноÑтавна Python Ñкрипта +Name[sr@Latn]=Jednostavna Python skripta +Name[sv]=Enkelt Python-skript +Name[tr]=Basit Python betiÄŸi +Name[zh_CN]=简å•çš„ Python 脚本 +Name[zh_TW]=簡單的 Python 文稿 +Icon=pythonhello.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python +Comment[ca]=Genera un simple programa de "Hello world" en Python +Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python +Comment[el]=Αυτό δημιουÏγεί Îνα απλό Ï€ÏόγÏαμμα "Γεια σου κόσμε" σε Python +Comment[es]=Genera un sencillo programa «Hola mundo» en Python +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis +Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Python lengoaian +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Python +Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python +Comment[hu]=Létrehoz egy egyszerű Hello world programot Python nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Python +Comment[ja]=ç°¡å˜ãª Hello world プãƒã‚°ãƒ©ãƒ ã‚’ Python ã§ä½œæˆã—ã¾ã™ +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm mit Python op. +Comment[ne]=यसले पाइथोनमा साधारण "हेलà¥à¤²à¥‹ वोलà¥à¤¡" कारà¥à¤¯à¤•à¥à¤°à¤® उतà¥à¤ªà¤¨à¥à¤¨ गरà¥à¤¦à¤› +Comment[nl]=Dit genereert een eenvoudig "Hello World"-programma in Python +Comment[pl]=Generuje prosty program "Witaj Å›wiecie" w Pythonie +Comment[pt]=Isto gera um programa simples "Olá mundo" em Python +Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python +Comment[ru]=Создание проÑтой программы "Hello world" на Python +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python +Comment[sr]=Прави једноÑтаван „Здраво Ñвете“ програм у Python-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u Python-u +Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python +Comment[tr]=Bu, Python'da basit bir "Merhaba Dünya" programı yaratır. +Comment[zh_CN]=这将生æˆä¸€ä¸ªç®€å•çš„ Python è¯è¨€â€œHello worldâ€ç¨‹åº +Comment[zh_TW]=產生一個 Python çš„ç°¡å–® Hello world ç¨‹å¼ +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pythonhello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.kdevelop +Dest=%{dest}/%{APPNAMELC}.kdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[MSG] +Type=message +Comment=A simple python script was created in %{dest} +Comment[ca]=Un simple script en Python ha estat creat en %{dest} +Comment[da]=Et simpelt python script blev oprettet i %{dest} +Comment[de]=Ein einfaches Python-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάÏιο python δημιουÏγήθηκε στο %{dest} +Comment[es]=Un sencillo programa en Python ha sido creado en %{dest} +Comment[et]=Lihtne Pythoni skript loodi asukohta %{dest} +Comment[eu]=Python programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون در %{dest} ایجاد شد +Comment[fr]=Un script Python simple a été créé dans %{dest} +Comment[ga]=CruthaÃodh script shimplà Python i %{dest} +Comment[gl]=Creouse un script sinxelo en python en %{dest} +Comment[hu]=Létrejött egy egyszerű Python-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script python in %{dest} +Comment[ja]=ç°¡å˜ãª python スクリプトを %{dest} ã«ä½œæˆã—ã¾ã—㟠+Comment[nds]=In %{dest} wöör en eenfach Python-Skript opstellt. +Comment[ne]=साधारण पाइथोन सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ %{dest} मा सिरà¥à¤œà¤¨à¤¾ गरियो +Comment[nl]=Een eenvoudig Python-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt w Pythonie zostaÅ‚ utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Python em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Python em %{dest} +Comment[ru]=ПроÑтой Ñкрипт Python Ñоздан в %{dest} +Comment[sk]=Jednoduchý Python skript bol vytvorený v %{dest} +Comment[sr]=ЈедноÑтавна python Ñкрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna python skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Python-skript skapades i %{dest} +Comment[tr]=Basit bir python betiÄŸi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简å•çš„ Python è¯è¨€è„šæœ¬ +Comment[zh_TW]=一個簡單的 python 文稿框架已建立於 %{dest} diff --git a/languages/python/app_templates/pythonhello/pythonhello.png b/languages/python/app_templates/pythonhello/pythonhello.png Binary files differnew file mode 100644 index 00000000..c27ab24d --- /dev/null +++ b/languages/python/app_templates/pythonhello/pythonhello.png diff --git a/languages/python/app_templates/pytk/.kdev_ignore b/languages/python/app_templates/pytk/.kdev_ignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/python/app_templates/pytk/.kdev_ignore diff --git a/languages/python/app_templates/pytk/Makefile.am b/languages/python/app_templates/pytk/Makefile.am new file mode 100644 index 00000000..0639ee15 --- /dev/null +++ b/languages/python/app_templates/pytk/Makefile.am @@ -0,0 +1,15 @@ +dataFiles = app.py app.kdevelop pytk.png +templateName = pytk +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz
\ No newline at end of file diff --git a/languages/python/app_templates/pytk/app.kdevelop b/languages/python/app_templates/pytk/app.kdevelop new file mode 100644 index 00000000..044ea0b7 --- /dev/null +++ b/languages/python/app_templates/pytk/app.kdevelop @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<kdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevScriptProject</projectmanagement> + <primarylanguage>Python</primarylanguage> + <keywords> + <keyword>Python</keyword> + </keywords> + <ignoreparts/> + </general> + <kdevscriptproject> + <general> + <activedir></activedir> + </general> + <run> + <mainprogram>%{APPNAMELC}.py</mainprogram> + </run> + </kdevscriptproject> + <kdevdoctreeview> + <ignoretocs> + <toc>ada</toc> + <toc>ada_bugs_gcc</toc> + <toc>bash</toc> + <toc>bash_bugs</toc> + <toc>c++_bugs_gcc</toc> + <toc>clanlib</toc> + <toc>w3c-dom-level2-html</toc> + <toc>fortran_bugs_gcc</toc> + <toc>gnome1</toc> + <toc>gnustep</toc> + <toc>haskell</toc> + <toc>haskell_bugs_ghc</toc> + <toc>java_bugs_gcc</toc> + <toc>java_bugs_sun</toc> + <toc>kde2book</toc> + <toc>libc</toc> + <toc>libstdc++</toc> + <toc>opengl</toc> + <toc>pascal_bugs_fp</toc> + <toc>php</toc> + <toc>php_bugs</toc> + <toc>perl</toc> + <toc>perl_bugs</toc> + <toc>qt-kdev3</toc> + <toc>ruby</toc> + <toc>ruby_bugs</toc> + <toc>sdl</toc> + <toc>stl</toc> + <toc>w3c-svg</toc> + <toc>sw</toc> + <toc>w3c-uaag10</toc> + <toc>wxwidgets_bugs</toc> + </ignoretocs> + <ignoreqt_xml> + <toc>Guide to the Qt Translation Tools</toc> + <toc>Qt Assistant Manual</toc> + <toc>Qt Designer Manual</toc> + <toc>Qt Reference Documentation</toc> + <toc>qmake User Guide</toc> + </ignoreqt_xml> + <ignoredoxygen> + <toc>KDE Libraries (Doxygen)</toc> + </ignoredoxygen> + </kdevdoctreeview> + <kdevfileview> + <tree> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + </tree> + <groups> + <group pattern="*.py" name="Python files" /> + </groups> + </kdevfileview> + <kdevfilecreate> + <useglobaltypes> + <type ext="py"/> + </useglobaltypes> + </kdevfilecreate> +</kdevelop> diff --git a/languages/python/app_templates/pytk/app.py b/languages/python/app_templates/pytk/app.py new file mode 100644 index 00000000..39f4aa84 --- /dev/null +++ b/languages/python/app_templates/pytk/app.py @@ -0,0 +1,4 @@ +from Tkinter import * +widget = Label(None, text='Hello world!') +widget.pack() +widget.mainloop() diff --git a/languages/python/app_templates/pytk/pytk b/languages/python/app_templates/pytk/pytk new file mode 100644 index 00000000..36a92c47 --- /dev/null +++ b/languages/python/app_templates/pytk/pytk @@ -0,0 +1,12 @@ +# KDE Config File +[General] +Name=Simple Python/Tkinter script +Name[fr]=Un simple Python/Tkinter script de test "Hello world" +Name[de]=Ein einfaches Python/Tkinter Script « Hello world » +Icon=pytk.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python/Tkinter +Comment[fr]=Génère un simple script de test du type "Hello world" dans le language PYTHON/Tkinter. +Comment[de]=Es wird ein einfaches "Hello world"-Programm in Python/Tkinter erzeugt. +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=APPNAMELC.py diff --git a/languages/python/app_templates/pytk/pytk.kdevtemplate b/languages/python/app_templates/pytk/pytk.kdevtemplate new file mode 100644 index 00000000..3756df01 --- /dev/null +++ b/languages/python/app_templates/pytk/pytk.kdevtemplate @@ -0,0 +1,107 @@ +# KDE Config File +[General] +Name=Simple Python/Tkinter script +Name[ca]=Simple script en Python/Tkinter +Name[da]=Simpelt Python/Tkinter script +Name[de]=Einfaches Python/Tkinter-Skript +Name[el]=Απλό σενάÏιο Python/Tkinter +Name[es]=Guión sencillo en Python/Tkinter +Name[et]=Lihtne Pythoni/Tkinteri skript +Name[eu]=Python/Tkinter script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پیتون/Tkinter +Name[fr]=Script Python / Tkinter simple +Name[ga]=Script shimplà Python/Tkinter +Name[gl]=Script sinxelo Python/Tkinter +Name[hu]=Egyszerű Python/Tkinter-szkript +Name[it]=Semplice script Python/Tkinter +Name[ja]=ç°¡å˜ãª Python/Tkinter スクリプト +Name[nds]=Eenfach Python/Tkinter-Skript +Name[ne]=साधारण पाइथोन/Tkinter सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ +Name[nl]=Eenvoudig Python/Tkinter-script +Name[pl]=Prosty skrypt Python/Tkinter +Name[pt]=Programa simples em Python/Tkinter +Name[pt_BR]=Programa simples em Python/Tkinter +Name[ru]=ПроÑтой Ñкрипт Python/Tkinter +Name[sk]=Jednoduchý Python/Tkinter skript +Name[sr]=ЈедноÑтавна Python/Tkinter Ñкрипта +Name[sr@Latn]=Jednostavna Python/Tkinter skripta +Name[sv]=Enkelt Python/Tkinter-skript +Name[tr]=Basit Python/Tkinter betiÄŸi +Name[zh_CN]=简å•çš„ Python/Tkinter 脚本 +Name[zh_TW]=簡單的 Python/Tkinter 文稿 +Icon=pytk.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python/Tkinter +Comment[ca]=Genera un simple programa de "Hello world" en Python/Tkinter +Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python/Tkinter +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python/Tkinter +Comment[el]=Αυτό δημιουÏγεί Îνα απλό Ï€ÏόγÏαμμα "Γεια σου κόσμε" σε Python/Tkinter +Comment[es]=Genera un sencillo programa «Hola mundo» en Python/Tkinter +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis/Tkinteris +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Python/Tkinter-en +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون/Tkinter تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Python / Tkinter +Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python/Tkinter +Comment[hu]=Létrehoz egy egyszerű Hello world programot Python/Tkinter nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Python/Tkinter +Comment[ja]=ç°¡å˜ãª Hello world プãƒã‚°ãƒ©ãƒ ã‚’ Python/Tkinter ã§ä½œæˆã—ã¾ã™ +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Python/Tkinter op. +Comment[ne]=यसले पाइथोन/Tkinter मा साधारण "हेलà¥à¤²à¥‹ वोलà¥à¤¡" कारà¥à¤¯à¤•à¥à¤°à¤® उतà¥à¤ªà¤¨à¥à¤¨ गरà¥à¤¦à¤› +Comment[nl]=Dit genereert een eenvoudig "Hallo Wereld"-programma in Python/Tkinter +Comment[pl]=Generuje prosty skrypt "Witaj Å›wiecie" w Pythonie/Tkinterze +Comment[pt]=Isto gera um programa simples "Olá mundo" em Python/Tkinter +Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python/Tkinter +Comment[ru]=Создание проÑтой программы "Hello world" на Python и Tkinter +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python/Tkinter +Comment[sr]=Прави једноÑтаван „Здраво Ñвете“ у Python/Tkinter-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Python/Tkinter-u +Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python/Tkinter +Comment[tr]=Bu Python/Tkinter'da basit bir "Merhaba Dünya" programı yaratır. +Comment[zh_CN]=这将生æˆä¸€ä¸ªç®€å•çš„ Python/Tkinter è¯è¨€â€œHello worldâ€ç¨‹åº +Comment[zh_TW]=產生一個簡單的 Python/Tkinter çš„ Hello World ç¨‹å¼ +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pytk.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.kdevelop +Dest=%{dest}/%{APPNAMELC}.kdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[MSG] +Type=message +Comment=A simple Python/Tkinter script was created in %{dest} +Comment[ca]=Un simple script en Python/Tkinter ha estat creat en %{dest} +Comment[da]=Et simpelt Python/Tkinter script blev oprettet i %{dest} +Comment[de]=Ein einfaches Python/Tkinter-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάÏιο Python/Tkinter δημιουÏγήθηκε στο %{dest} +Comment[es]=Un sencillo guión en Python/Tkinter ha sido creado en %{dest} +Comment[et]=Lihtne Pythoni/Tkinteri skript loodi asukohta %{dest} +Comment[eu]=Python/Tkinter script sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون/Tkinter در %{dest} ایجاد شد +Comment[fr]=Un script Python / Tkinter simple a été créé dans %{dest} +Comment[ga]=CruthaÃodh script shimplà Python/Tkinter i %{dest} +Comment[gl]=Creouse un script sinxelo Python/Tkinter en %{dest} +Comment[hu]=Létrejött egy egyszerű Python/Tkinter-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script Python/Tkinter in %{dest} +Comment[ja]=ç°¡å˜ãª Python/Tkinter スクリプトを %{dest} ã«ä½œæˆã—ã¾ã—㟠+Comment[nds]=In %{dest} wöör en eenfach Python-/Tkinter-Skript opstellt. +Comment[ne]=साधारण पाइथोन/Tkinter सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ %{dest} मा सिरà¥à¤œà¤¨à¤¾ गरियो +Comment[nl]=Een eenvoudig Python/Tkinter-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt Python/Tkinter zostaÅ‚ utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Python/Tkinter em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Python/Tkinter em %{dest} +Comment[ru]=ПроÑтой Ñкрипт Python/Tkinter Ñоздан в %{dest} +Comment[sk]=Jednoduchý Python/Tkinter skript bol vytvorený v %{dest} +Comment[sr]=ЈедноÑтавна Python/Tkinter Ñкрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna Python/Tkinter skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Python/Tkinter-skript skapades i %{dest} +Comment[tr]=Basit Python/Tkinter betiÄŸi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简å•çš„ Python/Tkinter 脚本 +Comment[zh_TW]=一個簡單的 Python/Tkinter 文稿已建立於 %{dest} diff --git a/languages/python/app_templates/pytk/pytk.png b/languages/python/app_templates/pytk/pytk.png Binary files differnew file mode 100644 index 00000000..c8c28f8d --- /dev/null +++ b/languages/python/app_templates/pytk/pytk.png diff --git a/languages/python/doc/Makefile.am b/languages/python/doc/Makefile.am new file mode 100644 index 00000000..5159f5f0 --- /dev/null +++ b/languages/python/doc/Makefile.am @@ -0,0 +1,6 @@ +tocdir = ${kde_datadir}/kdevdocumentation/tocs +toc_DATA = python.toc python_bugs.toc + +#indexdir = ${kde_datadir}/devdoctreeview/indices +#index_DATA = python.index + diff --git a/languages/python/doc/python.toc b/languages/python/doc/python.toc new file mode 100644 index 00000000..e5c67dda --- /dev/null +++ b/languages/python/doc/python.toc @@ -0,0 +1,1571 @@ +<!DOCTYPE kdeveloptoc> +<kdeveloptoc> +<title>Python</title> +<base href="http://docs.python.org"/> +<tocsect1 name="Tutorial" url="tut/tut.html"> +<tocsect2 name="Front Matter" url="tut/node1.html"/> +<tocsect2 name="Contents" url="tut/node2.html"/> +<tocsect2 name="1. Whetting Your Appetite " url="tut/node3.html"> +<tocsect3 name="1.1 Where From Here " url="tut/node3.html#SECTION003100000000000000000"/> +</tocsect2> +<tocsect2 name="2. Using the Python Interpreter " url="tut/node4.html"> +<tocsect3 name="2.1 Invoking the Interpreter " url="tut/node4.html#SECTION004100000000000000000"> +<tocsect4 name="2.1.1 Argument Passing " url="tut/node4.html#SECTION004110000000000000000"/> +<tocsect4 name="2.1.2 Interactive Mode " url="tut/node4.html#SECTION004120000000000000000"/> +</tocsect3> +<tocsect3 name="2.2 The Interpreter and Its Environment " url="tut/node4.html#SECTION004200000000000000000"> +<tocsect4 name="2.2.1 Error Handling " url="tut/node4.html#SECTION004210000000000000000"/> +<tocsect4 name="2.2.2 Executable Python Scripts " url="tut/node4.html#SECTION004220000000000000000"/> +<tocsect4 name="2.2.3 The Interactive Startup File " url="tut/node4.html#SECTION004230000000000000000"/> +</tocsect3> +</tocsect2> +<tocsect2 name="3. An Informal Introduction to Python " url="tut/node5.html"> +<tocsect3 name="3.1 Using Python as a Calculator " url="tut/node5.html#SECTION005100000000000000000"> +<tocsect4 name="3.1.1 Numbers " url="tut/node5.html#SECTION005110000000000000000"/> +<tocsect4 name="3.1.2 Strings " url="tut/node5.html#SECTION005120000000000000000"/> +<tocsect4 name="3.1.3 Unicode Strings " url="tut/node5.html#SECTION005130000000000000000"/> +<tocsect4 name="3.1.4 Lists " url="tut/node5.html#SECTION005140000000000000000"/> +</tocsect3> +<tocsect3 name="3.2 First Steps Towards Programming " url="tut/node5.html#SECTION005200000000000000000"/> +</tocsect2> +<tocsect2 name="4. More Control Flow Tools " url="tut/node6.html"> +<tocsect3 name="4.1 if Statements " url="tut/node6.html#SECTION006100000000000000000"/> +<tocsect3 name="4.2 for Statements " url="tut/node6.html#SECTION006200000000000000000"/> +<tocsect3 name="4.3 The range() Function " url="tut/node6.html#SECTION006300000000000000000"/> +<tocsect3 name="4.5 pass Statements " url="tut/node6.html#SECTION006500000000000000000"/> +<tocsect3 name="4.6 Defining Functions " url="tut/node6.html#SECTION006600000000000000000"/> +<tocsect3 name="4.7 More on Defining Functions " url="tut/node6.html#SECTION006700000000000000000"> +<tocsect4 name="4.7.1 Default Argument Values " url="tut/node6.html#SECTION006710000000000000000"/> +<tocsect4 name="4.7.2 Keyword Arguments " url="tut/node6.html#SECTION006720000000000000000"/> +<tocsect4 name="4.7.3 Arbitrary Argument Lists " url="tut/node6.html#SECTION006730000000000000000"/> +<tocsect4 name="4.7.4 Lambda Forms " url="tut/node6.html#SECTION006740000000000000000"/> +<tocsect4 name="4.7.5 Documentation Strings " url="tut/node6.html#SECTION006750000000000000000"/> +</tocsect3> +</tocsect2> +<tocsect2 name="5. Data Structures " url="tut/node7.html"> +<tocsect3 name="5.1 More on Lists " url="tut/node7.html#SECTION007100000000000000000"> +<tocsect4 name="5.1.1 Using Lists as Stacks " url="tut/node7.html#SECTION007110000000000000000"/> +<tocsect4 name="5.1.2 Using Lists as Queues " url="tut/node7.html#SECTION007120000000000000000"/> +<tocsect4 name="5.1.3 Functional Programming Tools " url="tut/node7.html#SECTION007130000000000000000"/> +<tocsect4 name="5.1.4 List Comprehensions" url="tut/node7.html#SECTION007140000000000000000"/> +</tocsect3> +<tocsect3 name="5.2 The del statement " url="tut/node7.html#SECTION007200000000000000000"/> +<tocsect3 name="5.3 Tuples and Sequences " url="tut/node7.html#SECTION007300000000000000000"/> +<tocsect3 name="5.4 Dictionaries " url="tut/node7.html#SECTION007400000000000000000"/> +<tocsect3 name="5.5 More on Conditions " url="tut/node7.html#SECTION007500000000000000000"/> +<tocsect3 name="5.6 Comparing Sequences and Other Types " url="tut/node7.html#SECTION007600000000000000000"/> +</tocsect2> +<tocsect2 name="6. Modules " url="tut/node8.html"> +<tocsect3 name="6.1 More on Modules " url="tut/node8.html#SECTION008100000000000000000"> +<tocsect4 name="6.1.1 The Module Search Path " url="tut/node8.html#SECTION008110000000000000000"/> +<tocsect4 name="6.1.2 ``Compiled'' Python files" url="tut/node8.html#SECTION008120000000000000000"/> +</tocsect3> +<tocsect3 name="6.2 Standard Modules " url="tut/node8.html#SECTION008200000000000000000"/> +<tocsect3 name="6.3 The dir() Function " url="tut/node8.html#SECTION008300000000000000000"/> +<tocsect3 name="6.4 Packages " url="tut/node8.html#SECTION008400000000000000000"> +<tocsect4 name="6.4.1 Importing * From a Package " url="tut/node8.html#SECTION008410000000000000000"/> +<tocsect4 name="6.4.2 Intra-package References" url="tut/node8.html#SECTION008420000000000000000"/> +</tocsect3> +</tocsect2> +<tocsect2 name="7. Input and Output " url="tut/node9.html"> +<tocsect3 name="7.1 Fancier Output Formatting " url="tut/node9.html#SECTION009100000000000000000"/> +<tocsect3 name="7.2 Reading and Writing Files " url="tut/node9.html#SECTION009200000000000000000"> +<tocsect4 name="7.2.1 Methods of File Objects " url="tut/node9.html#SECTION009210000000000000000"/> +<tocsect4 name="7.2.2 The pickle Module " url="tut/node9.html#SECTION009220000000000000000"/> +</tocsect3> +</tocsect2> +<tocsect2 name="8. Errors and Exceptions " url="tut/node10.html"> +<tocsect3 name="8.1 Syntax Errors " url="tut/node10.html#SECTION0010100000000000000000"/> +<tocsect3 name="8.2 Exceptions " url="tut/node10.html#SECTION0010200000000000000000"/> +<tocsect3 name="8.3 Handling Exceptions " url="tut/node10.html#SECTION0010300000000000000000"/> +<tocsect3 name="8.4 Raising Exceptions " url="tut/node10.html#SECTION0010400000000000000000"/> +<tocsect3 name="8.5 User-defined Exceptions " url="tut/node10.html#SECTION0010500000000000000000"/> +<tocsect3 name="8.6 Defining Clean-up Actions " url="tut/node10.html#SECTION0010600000000000000000"/> +</tocsect2> +<tocsect2 name="9. Classes " url="tut/node11.html"> +<tocsect3 name="9.1 A Word About Terminology " url="tut/node11.html#SECTION0011100000000000000000"/> +<tocsect3 name="9.2 Python Scopes and Name Spaces " url="tut/node11.html#SECTION0011200000000000000000"/> +<tocsect3 name="9.3 A First Look at Classes " url="tut/node11.html#SECTION0011300000000000000000"> +<tocsect4 name="9.3.1 Class Definition Syntax " url="tut/node11.html#SECTION0011310000000000000000"/> +<tocsect4 name="9.3.2 Class Objects " url="tut/node11.html#SECTION0011320000000000000000"/> +<tocsect4 name="9.3.3 Instance Objects " url="tut/node11.html#SECTION0011330000000000000000"/> +<tocsect4 name="9.3.4 Method Objects " url="tut/node11.html#SECTION0011340000000000000000"/> +</tocsect3> +<tocsect3 name="9.4 Random Remarks " url="tut/node11.html#SECTION0011400000000000000000"/> +<tocsect3 name="9.5 Inheritance " url="tut/node11.html#SECTION0011500000000000000000"> +<tocsect4 name="9.5.1 Multiple Inheritance " url="tut/node11.html#SECTION0011510000000000000000"/> +</tocsect3> +<tocsect3 name="9.6 Private Variables " url="tut/node11.html#SECTION0011600000000000000000"/> +<tocsect3 name="9.7 Odds and Ends " url="tut/node11.html#SECTION0011700000000000000000"> +<tocsect4 name="9.7.1 Exceptions Can Be Classes " url="tut/node11.html#SECTION0011710000000000000000"/> +</tocsect3> +</tocsect2> +<tocsect2 name="10. What Now? " url="tut/node12.html"> +<tocsect3 name="A.1 Line Editing " url="tut/node13.html#SECTION0013100000000000000000"/> +<tocsect3 name="A.2 History Substitution " url="tut/node13.html#SECTION0013200000000000000000"/> +<tocsect3 name="A.3 Key Bindings " url="tut/node13.html#SECTION0013300000000000000000"/> +<tocsect3 name="A.4 Commentary " url="tut/node13.html#SECTION0013400000000000000000"/> +</tocsect2> +<tocsect2 name="About this document ..." url="tut/node14.html"/> +</tocsect1> +<tocsect1 name="Language Reference" url="ref/ref.html"> +<tocsect2 name="Front Matter" url="ref/front.html"/> +<tocsect2 name="Contents" url="ref/contents.html"/> +<tocsect2 name="1. Introduction" url="ref/introduction.html"> +<tocsect3 name="1.1 Notation" url="ref/notation.html"/> +</tocsect2> +<tocsect2 name="2. Lexical analysis" url="ref/lexical.html"> +<tocsect3 name="2.1 Line structure" url="ref/line-structure.html"> +<tocsect4 name="2.1.1 Logical lines" url="ref/logical.html"/> +<tocsect4 name="2.1.2 Physical lines" url="ref/physical.html"/> +<tocsect4 name="2.1.3 Comments" url="ref/comments.html"/> +<tocsect4 name="2.1.4 Explicit line joining" url="ref/explicit-joining.html"/> +<tocsect4 name="2.1.5 Implicit line joining" url="ref/implicit-joining.html"/> +<tocsect4 name="2.1.6 Blank lines " url="ref/blank-lines.html"/> +<tocsect4 name="2.1.7 Indentation" url="ref/indentation.html"/> +<tocsect4 name="2.1.8 Whitespace between tokens" url="ref/whitespace.html"/> +</tocsect3> +<tocsect3 name="2.2 Other tokens" url="ref/other-tokens.html"/> +<tocsect3 name="2.3 Identifiers and keywords" url="ref/identifiers.html"> +<tocsect4 name="2.3.1 Keywords" url="ref/keywords.html"/> +<tocsect4 name="2.3.2 Reserved classes of identifiers" url="ref/id-classes.html"/> +</tocsect3> +<tocsect3 name="2.4 Literals" url="ref/literals.html"> +<tocsect4 name="2.4.1 String literals" url="ref/strings.html"/> +<tocsect4 name="2.4.2 String literal concatenation" url="ref/string-catenation.html"/> +<tocsect4 name="2.4.3 Numeric literals" url="ref/numbers.html"/> +<tocsect4 name="2.4.4 Integer and long integer literals" url="ref/integers.html"/> +<tocsect4 name="2.4.5 Floating point literals" url="ref/floating.html"/> +<tocsect4 name="2.4.6 Imaginary literals" url="ref/imaginary.html"/> +</tocsect3> +<tocsect3 name="2.5 Operators" url="ref/operators.html"/> +<tocsect3 name="2.6 Delimiters" url="ref/delimiters.html"/> +</tocsect2> +<tocsect2 name="3. Data model" url="ref/datamodel.html"> +<tocsect3 name="3.1 Objects, values and types" url="ref/objects.html"/> +<tocsect3 name="3.2 The standard type hierarchy" url="ref/types.html"/> +<tocsect3 name="3.3 Special method names" url="ref/specialnames.html"> +<tocsect4 name="3.3.1 Basic customization" url="ref/customization.html"/> +<tocsect4 name="3.3.2 Customizing attribute access" url="ref/attribute-access.html"/> +<tocsect4 name="3.3.3 Emulating callable objects" url="ref/callable-types.html"/> +<tocsect4 name="3.3.4 Emulating sequence and mapping types" url="ref/sequence-types.html"/> +<tocsect4 name="3.3.5 Additional methods for emulation of sequence types " url="ref/sequence-methods.html"/> +<tocsect4 name="3.3.6 Emulating numeric types" url="ref/numeric-types.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="4. Execution model " url="ref/execmodel.html"> +<tocsect3 name="4.1 Code blocks, execution frames, and namespaces " url="ref/execframes.html"/> +<tocsect3 name="4.2 Exceptions " url="ref/exceptions.html"/> +</tocsect2> +<tocsect2 name="5. Expressions" url="ref/expressions.html"> +<tocsect3 name="5.1 Arithmetic conversions" url="ref/conversions.html"/> +<tocsect3 name="5.2 Atoms" url="ref/atoms.html"> +<tocsect4 name="5.2.1 Identifiers (Names)" url="ref/atom-identifiers.html"/> +<tocsect4 name="5.2.2 Literals" url="ref/atom-literals.html"/> +<tocsect4 name="5.2.3 Parenthesized forms" url="ref/parenthesized.html"/> +<tocsect4 name="5.2.4 List displays" url="ref/lists.html"/> +<tocsect4 name="5.2.5 Dictionary displays" url="ref/dict.html"/> +<tocsect4 name="5.2.6 String conversions" url="ref/string-conversions.html"/> +</tocsect3> +<tocsect3 name="5.3 Primaries" url="ref/primaries.html"> +<tocsect4 name="5.3.1 Attribute references" url="ref/attribute-references.html"/> +<tocsect4 name="5.3.2 Subscriptions" url="ref/subscriptions.html"/> +<tocsect4 name="5.3.3 Slicings" url="ref/slicings.html"/> +<tocsect4 name="5.3.4 Calls" url="ref/calls.html"/> +</tocsect3> +<tocsect3 name="5.4 The power operator" url="ref/power.html"/> +<tocsect3 name="5.5 Unary arithmetic operations " url="ref/unary.html"/> +<tocsect3 name="5.6 Binary arithmetic operations" url="ref/binary.html"/> +<tocsect3 name="5.7 Shifting operations" url="ref/shifting.html"/> +<tocsect3 name="5.8 Binary bit-wise operations" url="ref/bitwise.html"/> +<tocsect3 name="5.9 Comparisons" url="ref/comparisons.html"/> +<tocsect3 name="5.10 Boolean operations" url="ref/lambda.html"/> +<tocsect3 name="5.11 Expression lists" url="ref/exprlists.html"/> +<tocsect3 name="5.12 Summary" url="ref/summary.html"/> +</tocsect2> +<tocsect2 name="6. Simple statements " url="ref/simple.html"> +<tocsect3 name="6.1 Expression statements " url="ref/exprstmts.html"/> +<tocsect3 name="6.2 Assert statements " url="ref/assert.html"/> +<tocsect3 name="6.3 Assignment statements " url="ref/assignment.html"> +<tocsect4 name="6.3.1 Augmented Assignment statements " url="ref/augassign.html"/> +</tocsect3> +<tocsect3 name="6.4 The pass statement " url="ref/pass.html"/> +<tocsect3 name="6.5 The del statement " url="ref/del.html"/> +<tocsect3 name="6.6 The print statement " url="ref/print.html"/> +<tocsect3 name="6.7 The return statement " url="ref/return.html"/> +<tocsect3 name="6.8 The raise statement " url="ref/raise.html"/> +<tocsect3 name="6.9 The break statement " url="ref/break.html"/> +<tocsect3 name="6.10 The continue statement " url="ref/continue.html"/> +<tocsect3 name="6.11 The import statement " url="ref/import.html"/> +<tocsect3 name="6.12 The global statement " url="ref/global.html"/> +<tocsect3 name="6.13 The exec statement " url="ref/exec.html"/> +</tocsect2> +<tocsect2 name="7. Compound statements" url="ref/compound.html"> +<tocsect3 name="7.1 The if statement" url="ref/if.html"/> +<tocsect3 name="7.2 The while statement" url="ref/while.html"/> +<tocsect3 name="7.3 The for statement" url="ref/for.html"/> +<tocsect3 name="7.4 The try statement" url="ref/try.html"/> +<tocsect3 name="7.5 Function definitions" url="ref/function.html"/> +<tocsect3 name="7.6 Class definitions" url="ref/class.html"/> +</tocsect2> +<tocsect2 name="8. Top-level components" url="ref/top-level.html"> +<tocsect3 name="8.1 Complete Python programs" url="ref/programs.html"/> +<tocsect3 name="8.2 File input" url="ref/file-input.html"/> +<tocsect3 name="8.3 Interactive input" url="ref/interactive.html"/> +<tocsect3 name="8.4 Expression input" url="ref/expression-input.html"/> +</tocsect2> +<tocsect2 name="Index" url="ref/genindex.html"/> +<tocsect2 name="About this document ..." url="ref/about.html"/> +</tocsect1> +<tocsect1 name="Extending and Embedding" url="ext/ext.html"> +<tocsect2 name="Front Matter" url="ext/front.html"/> +<tocsect2 name="Contents" url="ext/contents.html"/> +<tocsect2 name="1. Extending Python with C or C++ " url="ext/intro.html"> +<tocsect3 name="1.1 A Simple Example " url="ext/simpleExample.html"/> +<tocsect3 name="1.2 Intermezzo: Errors and Exceptions " url="ext/errors.html"/> +<tocsect3 name="1.3 Back to the Example " url="ext/backToExample.html"/> +<tocsect3 name="1.4 The Module's Method Table and Initialization Function " url="ext/methodTable.html"/> +<tocsect3 name="1.5 Compilation and Linkage " url="ext/compilation.html"/> +<tocsect3 name="1.6 Calling Python Functions from C " url="ext/callingPython.html"/> +<tocsect3 name="1.7 Format Strings for PyArg_ParseTuple() " url="ext/parseTuple.html"/> +<tocsect3 name="1.8 Keyword Parsing with PyArg_ParseTupleAndKeywords() " url="ext/parseTupleAndKeywords.html"/> +<tocsect3 name="1.9 The Py_BuildValue() Function " url="ext/buildValue.html"/> +<tocsect3 name="1.10 Reference Counts " url="ext/refcounts.html"> +<tocsect4 name="1.10.1 Reference Counting in Python " url="ext/refcountsInPython.html"/> +<tocsect4 name="1.10.2 Ownership Rules " url="ext/ownershipRules.html"/> +<tocsect4 name="1.10.3 Thin Ice " url="ext/thinIce.html"/> +<tocsect4 name="1.10.4 NULL Pointers " url="ext/nullPointers.html"/> +</tocsect3> +<tocsect3 name="1.11 Writing Extensions in C++ " url="ext/cplusplus.html"/> +<tocsect3 name="1.12 Providing a C API for an Extension Module " url="ext/using-cobjects.html"/> +</tocsect2> +<tocsect2 name="2. Building C and C++ Extensions on Unix " url="ext/building-on-unix.html"> +<tocsect3 name="2.1 Building Custom Interpreters " url="ext/custom-interps.html"/> +<tocsect3 name="2.2 Module Definition Options " url="ext/module-defn-options.html"/> +<tocsect3 name="2.3 Example " url="ext/module-defn-example.html"/> +<tocsect3 name="2.4 Distributing your extension modules " url="ext/distributing.html"/> +</tocsect2> +<tocsect2 name="3. Building C and C++ Extensions on Windows " url="ext/building-on-windows.html"> +<tocsect3 name="3.1 A Cookbook Approach " url="ext/win-cookbook.html"/> +<tocsect3 name="3.2 Differences Between Unix and Windows " url="ext/dynamic-linking.html"/> +<tocsect3 name="3.3 Using DLLs in Practice " url="ext/win-dlls.html"/> +</tocsect2> +<tocsect2 name="4. Embedding Python in Another Application " url="ext/embedding.html"> +<tocsect3 name="4.1 Embedding Python in C++ " url="ext/embeddingInCplusplus.html"/> +<tocsect3 name="4.2 Linking Requirements " url="ext/link-reqs.html"/> +</tocsect2> +<tocsect2 name="A. Reporting Bugs" url="ext/reporting-bugs.html"/> +<tocsect2 name="About this document ..." url="ext/about.html"/> +</tocsect1> +<tocsect1 name="Python/C API Reference" url="api/api.html"> +<tocsect2 name="Front Matter" url="api/front.html"/> +<tocsect2 name="Contents" url="api/contents.html"/> +<tocsect2 name="1. Introduction " url="api/intro.html"> +<tocsect3 name="1.1 Include Files " url="api/includes.html"/> +<tocsect3 name="1.2 Objects, Types and Reference Counts " url="api/objects.html"> +<tocsect4 name="1.2.1 Reference Counts " url="api/refcounts.html"/> +<tocsect4 name="1.2.2 Types " url="api/types.html"/> +</tocsect3> +<tocsect3 name="1.3 Exceptions " url="api/exceptions.html"/> +<tocsect3 name="1.4 Embedding Python " url="api/embedding.html"/> +</tocsect2> +<tocsect2 name="2. The Very High Level Layer " url="api/veryhigh.html"/> +<tocsect2 name="3. Reference Counting " url="api/countingRefs.html"/> +<tocsect2 name="4. Exception Handling " url="api/exceptionHandling.html"> +<tocsect3 name="4.1 Standard Exceptions " url="api/standardExceptions.html"/> +<tocsect3 name="4.2 Deprecation of String Exceptions" url="api/node15.html"/> +</tocsect2> +<tocsect2 name="5. Utilities " url="api/utilities.html"> +<tocsect3 name="5.1 OS Utilities " url="api/os.html"/> +<tocsect3 name="5.2 Process Control " url="api/processControl.html"/> +<tocsect3 name="5.3 Importing Modules " url="api/importing.html"/> +</tocsect2> +<tocsect2 name="6. Abstract Objects Layer " url="api/abstract.html"> +<tocsect3 name="6.1 Object Protocol " url="api/object.html"/> +<tocsect3 name="6.2 Number Protocol " url="api/number.html"/> +<tocsect3 name="6.3 Sequence Protocol " url="api/sequence.html"/> +<tocsect3 name="6.4 Mapping Protocol " url="api/mapping.html"/> +</tocsect2> +<tocsect2 name="7. Concrete Objects Layer " url="api/concrete.html"> +<tocsect3 name="7.1 Fundamental Objects " url="api/fundamental.html"> +<tocsect4 name="7.1.1 Type Objects " url="api/typeObjects.html"/> +<tocsect4 name="7.1.2 The None Object " url="api/noneObject.html"/> +</tocsect3> +<tocsect3 name="7.2 Sequence Objects " url="api/sequenceObjects.html"> +<tocsect4 name="7.2.1 String Objects " url="api/stringObjects.html"/> +<tocsect4 name="7.2.2 Unicode Objects " url="api/unicodeObjects.html"/> +<tocsect4 name="7.2.3 Buffer Objects " url="api/bufferObjects.html"/> +<tocsect4 name="7.2.4 Tuple Objects " url="api/tupleObjects.html"/> +<tocsect4 name="7.2.5 List Objects " url="api/listObjects.html"/> +</tocsect3> +<tocsect3 name="7.3 Mapping Objects " url="api/mapObjects.html"> +<tocsect4 name="7.3.1 Dictionary Objects " url="api/dictObjects.html"/> +</tocsect3> +<tocsect3 name="7.4 Numeric Objects " url="api/numericObjects.html"> +<tocsect4 name="7.4.1 Plain Integer Objects " url="api/intObjects.html"/> +<tocsect4 name="7.4.2 Long Integer Objects " url="api/longObjects.html"/> +<tocsect4 name="7.4.3 Floating Point Objects " url="api/floatObjects.html"/> +<tocsect4 name="7.4.4 Complex Number Objects " url="api/complexObjects.html"/> +</tocsect3> +<tocsect3 name="7.5 Other Objects " url="api/otherObjects.html"> +<tocsect4 name="7.5.1 File Objects " url="api/fileObjects.html"/> +<tocsect4 name="7.5.2 Module Objects " url="api/moduleObjects.html"/> +<tocsect4 name="7.5.3 CObjects " url="api/cObjects.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="8. Initialization, Finalization, and Threads " url="api/initialization.html"> +<tocsect3 name="8.1 Thread State and the Global Interpreter Lock " url="api/threads.html"/> +</tocsect2> +<tocsect2 name="9. Memory Management " url="api/memory.html"> +<tocsect3 name="9.1 Overview " url="api/memoryOverview.html"/> +<tocsect3 name="9.2 Memory Interface " url="api/memoryInterface.html"/> +<tocsect3 name="9.3 Examples " url="api/memoryExamples.html"/> +</tocsect2> +<tocsect2 name="10. Defining New Object Types " url="api/newTypes.html"> +<tocsect3 name="10.1 Common Object Structures " url="api/common-structs.html"/> +<tocsect3 name="10.2 Mapping Object Structures " url="api/mapping-structs.html"/> +<tocsect3 name="10.3 Number Object Structures " url="api/number-structs.html"/> +<tocsect3 name="10.4 Sequence Object Structures " url="api/sequence-structs.html"/> +<tocsect3 name="10.5 Buffer Object Structures " url="api/buffer-structs.html"/> +</tocsect2> +<tocsect2 name="A. Reporting Bugs" url="api/reporting-bugs.html"/> +<tocsect2 name="Index" url="api/genindex.html"/> +<tocsect2 name="About this document ..." url="api/about.html"/> +</tocsect1> +<tocsect1 name="Library" url="lib/lib.html"> +<tocsect2 name="Front Matter" url="lib/front.html"/> +<tocsect2 name="Contents" url="lib/contents.html"/> +<tocsect2 name="1. Introduction" url="lib/intro.html"/> +<tocsect2 name="2. Built-in Types, Exceptions and Functions" url="lib/builtin.html"> +<tocsect3 name="2.1 Built-in Types " url="lib/types.html"> +<tocsect4 name="2.1.1 Truth Value Testing " url="lib/truth.html"/> +<tocsect4 name="2.1.2 Boolean Operations " url="lib/boolean.html"/> +<tocsect4 name="2.1.3 Comparisons " url="lib/comparisons.html"/> +<tocsect4 name="2.1.4 Numeric Types " url="lib/typesnumeric.html"/> +<tocsect4 name="2.1.5 Sequence Types " url="lib/typesseq.html"/> +<tocsect4 name="2.1.6 Mapping Types " url="lib/typesmapping.html"/> +<tocsect4 name="2.1.7 Other Built-in Types " url="lib/typesother.html"/> +<tocsect4 name="2.1.8 Special Attributes " url="lib/specialattrs.html"/> +</tocsect3> +<tocsect3 name="2.2 Built-in Exceptions" url="lib/module-exceptions.html"/> +<tocsect3 name="2.3 Built-in Functions " url="lib/built-in-funcs.html"/> +</tocsect2> +<tocsect2 name="3. Python Runtime Services " url="lib/python.html"> +<tocsect3 name="3.1 sys -- System-specific parameters and functions" url="lib/module-sys.html"/> +<tocsect3 name="3.2 gc -- Garbage Collector interface" url="lib/module-gc.html"/> +<tocsect3 name="3.3 atexit -- Exit handlers" url="lib/module-atexit.html"> +<tocsect4 name="3.3.1 atexit Example " url="lib/atexit-example.html"/> +</tocsect3> +<tocsect3 name="3.4 types -- Names for all built-in types" url="lib/module-types.html"/> +<tocsect3 name="3.5 UserDict -- Class wrapper for dictionary objects" url="lib/module-UserDict.html"/> +<tocsect3 name="3.6 UserList -- Class wrapper for list objects" url="lib/module-UserList.html"/> +<tocsect3 name="3.7 UserString -- Class wrapper for string objects" url="lib/module-UserString.html"/> +<tocsect3 name="3.8 operator -- Standard operators as functions." url="lib/module-operator.html"/> +<tocsect3 name="3.9 traceback -- Print or retrieve a stack traceback" url="lib/module-traceback.html"> +<tocsect4 name="3.9.1 Traceback Example " url="lib/traceback-example.html"/> +</tocsect3> +<tocsect3 name="3.10 linecache -- Random access to text lines" url="lib/module-linecache.html"/> +<tocsect3 name="3.11 pickle -- Python object serialization" url="lib/module-pickle.html"> +<tocsect4 name="3.11.1 Example " url="lib/pickle-example.html"/> +</tocsect3> +<tocsect3 name="3.12 cPickle -- Alternate implementation of pickle" url="lib/module-cPickle.html"/> +<tocsect3 name="3.13 copy_reg -- Register pickle support functions" url="lib/module-copyreg.html"/> +<tocsect3 name="3.14 shelve -- Python object persistence" url="lib/module-shelve.html"/> +<tocsect3 name="3.15 copy -- Shallow and deep copy operations" url="lib/module-copy.html"/> +<tocsect3 name="3.16 marshal -- Alternate Python object serialization" url="lib/module-marshal.html"/> +<tocsect3 name="3.17 imp -- Access the import internals" url="lib/module-imp.html"> +<tocsect4 name="3.17.1 Examples" url="lib/examples-imp.html"/> +</tocsect3> +<tocsect3 name="3.18 code -- Interpreter base classes" url="lib/module-code.html"> +<tocsect4 name="3.18.1 Interactive Interpreter Objects " url="lib/interpreter-objects.html"/> +<tocsect4 name="3.18.2 Interactive Console Objects " url="lib/console-objects.html"/> +</tocsect3> +<tocsect3 name="3.19 codeop -- Compile Python code" url="lib/module-codeop.html"/> +<tocsect3 name="3.20 pprint -- Data pretty printer" url="lib/module-pprint.html"> +<tocsect4 name="3.20.1 PrettyPrinter Objects" url="lib/PrettyPrinter_Objects.html"/> +</tocsect3> +<tocsect3 name="3.21 repr -- Alternate repr() implementation" url="lib/module-repr.html"> +<tocsect4 name="3.21.1 Repr Objects " url="lib/Repr-objects.html"/> +<tocsect4 name="3.21.2 Subclassing Repr Objects " url="lib/subclassing-reprs.html"/> +</tocsect3> +<tocsect3 name="3.22 new -- Creation of runtime internal objects" url="lib/module-new.html"/> +<tocsect3 name="3.23 site -- Site-specific configuration hook" url="lib/module-site.html"/> +<tocsect3 name="3.24 user -- User-specific configuration hook" url="lib/module-user.html"/> +<tocsect3 name="3.25 __builtin__ -- Built-in functions" url="lib/module-builtin.html"/> +<tocsect3 name="3.26 __main__ -- Top-level script environment" url="lib/module-main.html"/> +</tocsect2> +<tocsect2 name="4. String Services" url="lib/strings.html"> +<tocsect3 name="4.1 string -- Common string operations" url="lib/module-string.html"/> +<tocsect3 name="4.2 re -- Regular expression operations" url="lib/module-re.html"> +<tocsect4 name="4.2.1 Regular Expression Syntax " url="lib/re-syntax.html"/> +<tocsect4 name="4.2.2 Matching vs. Searching " url="lib/matching-searching.html"/> +<tocsect4 name="4.2.3 Module Contents" url="lib/Contents_of_Module_re.html"/> +<tocsect4 name="4.2.4 Regular Expression Objects " url="lib/re-objects.html"/> +<tocsect4 name="4.2.5 Match Objects " url="lib/match-objects.html"/> +</tocsect3> +<tocsect3 name="4.3 struct -- Interpret strings as packed binary data" url="lib/module-struct.html"/> +<tocsect3 name="4.4 fpformat -- Floating point conversions" url="lib/module-fpformat.html"/> +<tocsect3 name="4.5 StringIO -- Read and write strings as files" url="lib/module-StringIO.html"/> +<tocsect3 name="4.6 cStringIO -- Faster version of StringIO" url="lib/module-cStringIO.html"/> +<tocsect3 name="4.7 codecs -- Codec registry and base classes" url="lib/module-codecs.html"> +<tocsect4 name="4.7.1 Codec Base Classes" url="lib/node80.html"/> +</tocsect3> +<tocsect3 name="4.8 unicodedata -- Unicode Database" url="lib/module-unicodedata.html"/> +</tocsect2> +<tocsect2 name="5. Miscellaneous Services" url="lib/misc.html"> +<tocsect3 name="5.1 math -- Mathematical functions" url="lib/module-math.html"/> +<tocsect3 name="5.2 cmath -- Mathematical functions for complex numbers" url="lib/module-cmath.html"/> +<tocsect3 name="5.3 random -- Generate pseudo-random numbers" url="lib/module-random.html"> +<tocsect4 name="5.3.1 The Random Number Generator Interface " url="lib/rng-objects.html"/> +</tocsect3> +<tocsect3 name="5.4 whrandom -- Pseudo-random number generator" url="lib/module-whrandom.html"/> +<tocsect3 name="5.5 bisect -- Array bisection algorithm" url="lib/module-bisect.html"> +<tocsect4 name="5.5.1 Example" url="lib/bisect-example.html"/> +</tocsect3> +<tocsect3 name="5.6 array -- Efficient arrays of numeric values" url="lib/module-array.html"/> +<tocsect3 name="5.7 ConfigParser -- Configuration file parser" url="lib/module-ConfigParser.html"> +<tocsect4 name="5.7.1 ConfigParser Objects " url="lib/ConfigParser-objects.html"/> +</tocsect3> +<tocsect3 name="5.8 fileinput -- Iterate over lines from multiple input streams" url="lib/module-fileinput.html"/> +<tocsect3 name="5.9 calendar -- General calendar-related functions" url="lib/module-calendar.html"/> +<tocsect3 name="5.10 cmd -- Support for line-oriented command interpreters" url="lib/module-cmd.html"> +<tocsect4 name="5.10.1 Cmd Objects" url="lib/Cmd-objects.html"/> +</tocsect3> +<tocsect3 name="5.11 shlex -- Simple lexical analysis" url="lib/module-shlex.html"> +<tocsect4 name="5.11.1 shlex Objects " url="lib/shlex-objects.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="6. Generic Operating System Services " url="lib/allos.html"> +<tocsect3 name="6.1 os -- Miscellaneous OS interfaces" url="lib/module-os.html"> +<tocsect4 name="6.1.1 Process Parameters " url="lib/os-procinfo.html"/> +<tocsect4 name="6.1.2 File Object Creation " url="lib/os-newstreams.html"/> +<tocsect4 name="6.1.3 File Descriptor Operations " url="lib/os-fd-ops.html"/> +<tocsect4 name="6.1.4 Files and Directories " url="lib/os-file-dir.html"/> +<tocsect4 name="6.1.5 Process Management " url="lib/os-process.html"/> +<tocsect4 name="6.1.6 Miscellaneous System Information " url="lib/os-path.html"/> +</tocsect3> +<tocsect3 name="6.2 os.path -- Common pathname manipulations" url="lib/module-os.path.html"/> +<tocsect3 name="6.3 dircache -- Cached directory listings" url="lib/module-dircache.html"/> +<tocsect3 name="6.4 stat -- Interpreting stat() results" url="lib/module-stat.html"/> +<tocsect3 name="6.5 statcache -- An optimization of os.stat()" url="lib/module-statcache.html"/> +<tocsect3 name="6.6 statvfs -- Constants used with os.statvfs()" url="lib/module-statvfs.html"/> +<tocsect3 name="6.7 filecmp -- File and Directory Comparisons" url="lib/module-filecmp.html"> +<tocsect4 name="6.7.1 The dircmp class " url="lib/dircmp-objects.html"/> +</tocsect3> +<tocsect3 name="6.8 popen2 -- Subprocesses with accessible I/O streams" url="lib/module-popen2.html"> +<tocsect4 name="6.8.1 Popen3 and Popen4 Objects " url="lib/popen3-objects.html"/> +</tocsect3> +<tocsect3 name="6.9 time -- Time access and conversions" url="lib/module-time.html"/> +<tocsect3 name="6.10 sched -- Event scheduler" url="lib/module-sched.html"> +<tocsect4 name="6.10.1 Scheduler Objects " url="lib/scheduler-objects.html"/> +</tocsect3> +<tocsect3 name="6.11 getpass -- Portable password input" url="lib/module-getpass.html"/> +<tocsect3 name="6.12 curses -- Terminal handling for character-cell displays" url="lib/module-curses.html"> +<tocsect4 name="6.12.1 Functions " url="lib/curses-functions.html"/> +<tocsect4 name="6.12.2 Window Objects " url="lib/curses-window-objects.html"/> +<tocsect4 name="6.12.3 Constants" url="lib/node128.html"/> +</tocsect3> +<tocsect3 name="6.13 curses.textpad -- Text input widget for curses programs" url="lib/module-curses.textpad.html"> +<tocsect4 name="6.13.1 Textbox objects " url="lib/curses-textpad-objects.html"/> +</tocsect3> +<tocsect3 name="6.14 curses.wrapper -- Terminal handler for curses programs" url="lib/module-curses.wrapper.html"/> +<tocsect3 name="6.15 curses.ascii -- Utilities for ASCII characters" url="lib/module-curses.ascii.html"/> +<tocsect3 name="6.16 getopt -- Parser for command line options" url="lib/module-getopt.html"/> +<tocsect3 name="6.17 tempfile -- Generate temporary file names" url="lib/module-tempfile.html"/> +<tocsect3 name="6.18 errno -- Standard errno system symbols" url="lib/module-errno.html"/> +<tocsect3 name="6.19 glob -- Unix style pathname pattern expansion" url="lib/module-glob.html"/> +<tocsect3 name="6.20 fnmatch -- Unix filename pattern matching" url="lib/module-fnmatch.html"/> +<tocsect3 name="6.21 shutil -- High-level file operations" url="lib/module-shutil.html"> +<tocsect4 name="6.21.1 Example " url="lib/shutil-example.html"/> +</tocsect3> +<tocsect3 name="6.22 locale -- Internationalization services" url="lib/module-locale.html"> +<tocsect4 name="6.22.1 Background, details, hints, tips and caveats" url="lib/node141.html"/> +<tocsect4 name="6.22.2 For extension writers and programs that embed Python" url="lib/embedding-locale.html"/> +</tocsect3> +<tocsect3 name="6.23 gettext -- Multilingual internationalization services" url="lib/module-gettext.html"> +<tocsect4 name="6.23.1 GNU gettext API" url="lib/node144.html"/> +<tocsect4 name="6.23.2 Class-based API" url="lib/node145.html"/> +<tocsect4 name="6.23.3 Internationalizing your programs and modules" url="lib/node150.html"/> +<tocsect4 name="6.23.4 Acknowledgments" url="lib/node155.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="7. Optional Operating System Services" url="lib/someos.html"> +<tocsect3 name="7.1 signal -- Set handlers for asynchronous events" url="lib/module-signal.html"> +<tocsect4 name="7.1.1 Example" url="lib/Signal_Example.html"/> +</tocsect3> +<tocsect3 name="7.2 socket -- Low-level networking interface" url="lib/module-socket.html"> +<tocsect4 name="7.2.1 Socket Objects " url="lib/socket-objects.html"/> +<tocsect4 name="7.2.2 Example " url="lib/socket-example.html"/> +</tocsect3> +<tocsect3 name="7.3 select -- Waiting for I/O completion" url="lib/module-select.html"> +<tocsect4 name="7.3.1 Polling Objects " url="lib/poll-objects.html"/> +</tocsect3> +<tocsect3 name="7.4 thread -- Multiple threads of control" url="lib/module-thread.html"/> +<tocsect3 name="7.5 threading -- Higher-level threading interface" url="lib/module-threading.html"> +<tocsect4 name="7.5.1 Lock Objects " url="lib/lock-objects.html"/> +<tocsect4 name="7.5.2 RLock Objects " url="lib/rlock-objects.html"/> +<tocsect4 name="7.5.3 Condition Objects " url="lib/condition-objects.html"/> +<tocsect4 name="7.5.4 Semaphore Objects " url="lib/semaphore-objects.html"/> +<tocsect4 name="7.5.5 Event Objects " url="lib/event-objects.html"/> +<tocsect4 name="7.5.6 Thread Objects " url="lib/thread-objects.html"/> +</tocsect3> +<tocsect3 name="7.6 mutex -- Mutual exclusion support" url="lib/module-mutex.html"> +<tocsect4 name="7.6.1 Mutex Objects " url="lib/mutex-objects.html"/> +</tocsect3> +<tocsect3 name="7.7 Queue -- A synchronized queue class" url="lib/module-Queue.html"> +<tocsect4 name="7.7.1 Queue Objects" url="lib/QueueObjects.html"/> +</tocsect3> +<tocsect3 name="7.8 mmap -- Memory-mapped file support" url="lib/module-mmap.html"/> +<tocsect3 name="7.9 anydbm -- Generic access to DBM-style databases" url="lib/module-anydbm.html"/> +<tocsect3 name="7.10 dumbdbm -- Portable DBM implementation" url="lib/module-dumbdbm.html"/> +<tocsect3 name="7.11 dbhash -- DBM-style interface to the BSD database library" url="lib/module-dbhash.html"> +<tocsect4 name="7.11.1 Database Objects " url="lib/dbhash-objects.html"/> +</tocsect3> +<tocsect3 name="7.12 whichdb -- Guess which DBM module created a database" url="lib/module-whichdb.html"/> +<tocsect3 name="7.13 bsddb -- Interface to Berkeley DB library" url="lib/module-bsddb.html"> +<tocsect4 name="7.13.1 Hash, BTree and Record Objects " url="lib/bsddb-objects.html"/> +</tocsect3> +<tocsect3 name="7.14 zlib -- Compression compatible with gzip" url="lib/module-zlib.html"/> +<tocsect3 name="7.15 gzip -- Support for gzip files" url="lib/module-gzip.html"/> +<tocsect3 name="7.16 zipfile -- Work with ZIP archives" url="lib/module-zipfile.html"> +<tocsect4 name="7.16.1 ZipFile Objects " url="lib/zipfile-objects.html"/> +<tocsect4 name="7.16.2 PyZipFile Objects " url="lib/pyzipfile-objects.html"/> +<tocsect4 name="7.16.3 ZipInfo Objects " url="lib/zipinfo-objects.html"/> +</tocsect3> +<tocsect3 name="7.17 readline -- GNU readline interface" url="lib/module-readline.html"> +<tocsect4 name="7.17.1 Example " url="lib/readline-example.html"/> +</tocsect3> +<tocsect3 name="7.18 rlcompleter -- Completion function for GNU readline" url="lib/module-rlcompleter.html"> +<tocsect4 name="7.18.1 Completer Objects " url="lib/completer-objects.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="8. Unix Specific Services" url="lib/unix.html"> +<tocsect3 name="8.1 posix -- The most common POSIX system calls" url="lib/module-posix.html"> +<tocsect4 name="8.1.1 Large File Support " url="lib/posix-large-files.html"/> +<tocsect4 name="8.1.2 Module Contents " url="lib/posix-contents.html"/> +</tocsect3> +<tocsect3 name="8.2 pwd -- The password database" url="lib/module-pwd.html"/> +<tocsect3 name="8.3 grp -- The group database" url="lib/module-grp.html"/> +<tocsect3 name="8.4 crypt -- Function to check Unix passwords" url="lib/module-crypt.html"/> +<tocsect3 name="8.5 dl -- Call C functions in shared objects" url="lib/module-dl.html"> +<tocsect4 name="8.5.1 Dl Objects " url="lib/dl-objects.html"/> +</tocsect3> +<tocsect3 name="8.6 dbm -- Simple ``database'' interface" url="lib/module-dbm.html"/> +<tocsect3 name="8.7 gdbm -- GNU's reinterpretation of dbm" url="lib/module-gdbm.html"/> +<tocsect3 name="8.8 termios -- POSIX style tty control" url="lib/module-termios.html"> +<tocsect4 name="8.8.1 Example" url="lib/termios_Example.html"/> +</tocsect3> +<tocsect3 name="8.9 TERMIOS -- Constants used with the termios module" url="lib/module-TERMIOSuppercase.html"/> +<tocsect3 name="8.10 tty -- Terminal control functions" url="lib/module-tty.html"/> +<tocsect3 name="8.11 pty -- Pseudo-terminal utilities" url="lib/module-pty.html"/> +<tocsect3 name="8.12 fcntl -- The fcntl() and ioctl() system calls" url="lib/module-fcntl.html"/> +<tocsect3 name="8.13 pipes -- Interface to shell pipelines" url="lib/module-pipes.html"> +<tocsect4 name="8.13.1 Template Objects " url="lib/template-objects.html"/> +</tocsect3> +<tocsect3 name="8.14 posixfile -- File-like objects with locking support" url="lib/module-posixfile.html"/> +<tocsect3 name="8.15 resource -- Resource usage information" url="lib/module-resource.html"> +<tocsect4 name="8.15.1 Resource Limits" url="lib/node215.html"/> +<tocsect4 name="8.15.2 Resource Usage" url="lib/node216.html"/> +</tocsect3> +<tocsect3 name="8.16 nis -- Interface to Sun's NIS (Yellow Pages)" url="lib/module-nis.html"/> +<tocsect3 name="8.17 syslog -- Unix syslog library routines" url="lib/module-syslog.html"/> +<tocsect3 name="8.18 commands -- Utilities for running commands" url="lib/module-commands.html"/> +</tocsect2> +<tocsect2 name="9. The Python Debugger" url="lib/module-pdb.html"> +<tocsect3 name="9.1 Debugger Commands " url="lib/debugger-commands.html"/> +<tocsect3 name="9.2 How It Works" url="lib/node222.html"/> +</tocsect2> +<tocsect2 name="10. The Python Profiler " url="lib/profile.html"> +<tocsect3 name="10.1 Introduction to the profiler" url="lib/Profiler_Introduction.html"/> +<tocsect3 name="10.2 How Is This Profiler Different From The Old Profiler?" url="lib/Profiler_Changes.html"/> +<tocsect3 name="10.3 Instant Users Manual " url="lib/profile-instant.html"/> +<tocsect3 name="10.4 What Is Deterministic Profiling?" url="lib/Deterministic_Profiling.html"/> +<tocsect3 name="10.5 Reference Manual" url="lib/module-profile.html"> +<tocsect4 name="10.5.1 The Stats Class " url="lib/profile-stats.html"/> +</tocsect3> +<tocsect3 name="10.6 Limitations " url="lib/profile-limits.html"/> +<tocsect3 name="10.7 Calibration " url="lib/profile-calibration.html"/> +<tocsect3 name="10.8 Extensions -- Deriving Better Profilers" url="lib/Profiler_Extensions.html"> +<tocsect4 name="10.8.1 OldProfile Class " url="lib/profile-old.html"/> +<tocsect4 name="10.8.2 HotProfile Class " url="lib/profile-HotProfile.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="11. Internet Protocols and Support " url="lib/internet.html"> +<tocsect3 name="11.1 webbrowser -- Convenient Web-browser controller" url="lib/module-webbrowser.html"> +<tocsect4 name="11.1.1 Browser Controller Objects " url="lib/browser-controllers.html"/> +</tocsect3> +<tocsect3 name="11.2 cgi -- Common Gateway Interface support." url="lib/module-cgi.html"> +<tocsect4 name="11.2.1 Introduction" url="lib/cgi-intro.html"/> +<tocsect4 name="11.2.2 Using the cgi module" url="lib/Using_the_cgi_module.html"/> +<tocsect4 name="11.2.3 Old classes" url="lib/node241.html"/> +<tocsect4 name="11.2.4 Functions" url="lib/Functions_in_cgi_module.html"/> +<tocsect4 name="11.2.5 Caring about security" url="lib/node243.html"/> +<tocsect4 name="11.2.6 Installing your CGI script on a Unix system" url="lib/node244.html"/> +<tocsect4 name="11.2.7 Testing your CGI script" url="lib/node245.html"/> +<tocsect4 name="11.2.8 Debugging CGI scripts" url="lib/node246.html"/> +<tocsect4 name="11.2.9 Common problems and solutions" url="lib/node247.html"/> +</tocsect3> +<tocsect3 name="11.3 urllib -- Open arbitrary resources by URL" url="lib/module-urllib.html"> +<tocsect4 name="11.3.1 URLopener Objects " url="lib/urlopener-objs.html"/> +<tocsect4 name="11.3.2 Examples" url="lib/Urllib_Examples.html"/> +</tocsect3> +<tocsect3 name="11.4 httplib -- HTTP protocol client" url="lib/module-httplib.html"> +<tocsect4 name="11.4.1 HTTP Objects" url="lib/node252.html"/> +<tocsect4 name="11.4.2 Examples" url="lib/HTTP_Examples.html"/> +</tocsect3> +<tocsect3 name="11.5 ftplib -- FTP protocol client" url="lib/module-ftplib.html"> +<tocsect4 name="11.5.1 FTP Objects " url="lib/ftp-objects.html"/> +</tocsect3> +<tocsect3 name="11.6 gopherlib -- Gopher protocol client" url="lib/module-gopherlib.html"/> +<tocsect3 name="11.7 poplib -- POP3 protocol client" url="lib/module-poplib.html"> +<tocsect4 name="11.7.1 POP3 Objects " url="lib/pop3-objects.html"/> +<tocsect4 name="11.7.2 POP3 Example " url="lib/pop3-example.html"/> +</tocsect3> +<tocsect3 name="11.8 imaplib -- IMAP4 protocol client" url="lib/module-imaplib.html"> +<tocsect4 name="11.8.1 IMAP4 Objects " url="lib/imap4-objects.html"/> +<tocsect4 name="11.8.2 IMAP4 Example " url="lib/imap4-example.html"/> +</tocsect3> +<tocsect3 name="11.9 nntplib -- NNTP protocol client" url="lib/module-nntplib.html"> +<tocsect4 name="11.9.1 NNTP Objects " url="lib/nntp-objects.html"/> +</tocsect3> +<tocsect3 name="11.10 smtplib -- SMTP protocol client" url="lib/module-smtplib.html"> +<tocsect4 name="11.10.1 SMTP Objects " url="lib/SMTP-objects.html"/> +<tocsect4 name="11.10.2 SMTP Example " url="lib/SMTP-example.html"/> +</tocsect3> +<tocsect3 name="11.11 telnetlib -- Telnet client" url="lib/module-telnetlib.html"> +<tocsect4 name="11.11.1 Telnet Objects " url="lib/telnet-objects.html"/> +<tocsect4 name="11.11.2 Telnet Example " url="lib/telnet-example.html"/> +</tocsect3> +<tocsect3 name="11.12 urlparse -- Parse URLs into components" url="lib/module-urlparse.html"/> +<tocsect3 name="11.13 SocketServer -- A framework for network servers" url="lib/module-SocketServer.html"/> +<tocsect3 name="11.14 BaseHTTPServer -- Basic HTTP server" url="lib/module-BaseHTTPServer.html"/> +<tocsect3 name="11.15 SimpleHTTPServer -- Simple HTTP request handler" url="lib/module-SimpleHTTPServer.html"/> +<tocsect3 name="11.16 CGIHTTPServer -- CGI-capable HTTP request handler" url="lib/module-CGIHTTPServer.html"/> +<tocsect3 name="11.17 Cookie -- HTTP state management" url="lib/module-Cookie.html"> +<tocsect4 name="11.17.1 Cookie Objects " url="lib/cookie-objects.html"/> +<tocsect4 name="11.17.2 Morsel Objects " url="lib/morsel-objects.html"/> +<tocsect4 name="11.17.3 Example " url="lib/cookie-example.html"/> +</tocsect3> +<tocsect3 name="11.18 asyncore -- Asynchronous socket handler" url="lib/module-asyncore.html"> +<tocsect4 name="11.18.1 Example basic HTTP client " url="lib/asyncore-example.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="12. Internet Data Handling " url="lib/netdata.html"> +<tocsect3 name="12.1 formatter -- Generic output formatting" url="lib/module-formatter.html"> +<tocsect4 name="12.1.1 The Formatter Interface " url="lib/formatter-interface.html"/> +<tocsect4 name="12.1.2 Formatter Implementations " url="lib/formatter-impls.html"/> +<tocsect4 name="12.1.3 The Writer Interface " url="lib/writer-interface.html"/> +<tocsect4 name="12.1.4 Writer Implementations " url="lib/writer-impls.html"/> +</tocsect3> +<tocsect3 name="12.2 rfc822 -- Parse RFC 822 mail headers" url="lib/module-rfc822.html"> +<tocsect4 name="12.2.1 Message Objects " url="lib/message-objects.html"/> +<tocsect4 name="12.2.2 AddressList Objects " url="lib/addresslist-objects.html"/> +</tocsect3> +<tocsect3 name="12.3 mimetools -- Tools for parsing MIME messages" url="lib/module-mimetools.html"> +<tocsect4 name="12.3.1 Additional Methods of Message Objects " url="lib/mimetools-message-objects.html"/> +</tocsect3> +<tocsect3 name="12.4 MimeWriter -- Generic MIME file writer" url="lib/module-MimeWriter.html"> +<tocsect4 name="12.4.1 MimeWriter Objects " url="lib/MimeWriter-objects.html"/> +</tocsect3> +<tocsect3 name="12.5 multifile -- Support for files containing distinct parts" url="lib/module-multifile.html"> +<tocsect4 name="12.5.1 MultiFile Objects " url="lib/MultiFile-objects.html"/> +<tocsect4 name="12.5.2 MultiFile Example " url="lib/multifile-example.html"/> +</tocsect3> +<tocsect3 name="12.6 binhex -- Encode and decode binhex4 files" url="lib/module-binhex.html"> +<tocsect4 name="12.6.1 Notes " url="lib/binhex-notes.html"/> +</tocsect3> +<tocsect3 name="12.7 uu -- Encode and decode uuencode files" url="lib/module-uu.html"/> +<tocsect3 name="12.8 binascii -- Convert between binary and ASCII" url="lib/module-binascii.html"/> +<tocsect3 name="12.9 xdrlib -- Encode and decode XDR data" url="lib/module-xdrlib.html"> +<tocsect4 name="12.9.1 Packer Objects " url="lib/xdr-packer-objects.html"/> +<tocsect4 name="12.9.2 Unpacker Objects " url="lib/xdr-unpacker-objects.html"/> +<tocsect4 name="12.9.3 Exceptions " url="lib/xdr-exceptions.html"/> +</tocsect3> +<tocsect3 name="12.10 mailcap -- Mailcap file handling." url="lib/module-mailcap.html"/> +<tocsect3 name="12.11 mimetypes -- Map filenames to MIME types" url="lib/module-mimetypes.html"/> +<tocsect3 name="12.12 base64 -- Encode and decode MIME base64 data" url="lib/module-base64.html"/> +<tocsect3 name="12.13 quopri -- Encode and decode MIME quoted-printable data" url="lib/module-quopri.html"/> +<tocsect3 name="12.14 mailbox -- Read various mailbox formats" url="lib/module-mailbox.html"> +<tocsect4 name="12.14.1 Mailbox Objects " url="lib/mailbox-objects.html"/> +</tocsect3> +<tocsect3 name="12.15 mhlib -- Access to MH mailboxes" url="lib/module-mhlib.html"> +<tocsect4 name="12.15.1 MH Objects " url="lib/mh-objects.html"/> +<tocsect4 name="12.15.2 Folder Objects " url="lib/mh-folder-objects.html"/> +<tocsect4 name="12.15.3 Message Objects " url="lib/mh-message-objects.html"/> +</tocsect3> +<tocsect3 name="12.16 mimify -- MIME processing of mail messages" url="lib/module-mimify.html"/> +<tocsect3 name="12.17 netrc -- netrc file processing" url="lib/module-netrc.html"> +<tocsect4 name="12.17.1 netrc Objects " url="lib/netrc-objects.html"/> +</tocsect3> +<tocsect3 name="12.18 robotparser -- Parser for robots.txt" url="lib/module-robotparser.html"/> +</tocsect2> +<tocsect2 name="13. Structured Markup Processing Tools " url="lib/markup.html"> +<tocsect3 name="13.1 sgmllib -- Simple SGML parser" url="lib/module-sgmllib.html"/> +<tocsect3 name="13.2 htmllib -- A parser for HTML documents" url="lib/module-htmllib.html"> +<tocsect4 name="13.2.1 HTMLParser Objects " url="lib/html-parser-objects.html"/> +</tocsect3> +<tocsect3 name="13.3 htmlentitydefs -- Definitions of HTML general entities" url="lib/module-htmlentitydefs.html"/> +<tocsect3 name="13.4 xml.parsers.expat -- Fast XML parsing using the Expat library" url="lib/module-xml.parsers.expat.html"> +<tocsect4 name="13.4.1 Example " url="lib/expat-example.html"/> +<tocsect4 name="13.4.2 Expat error constants " url="lib/expat-errors.html"/> +</tocsect3> +<tocsect3 name="13.5 xml.sax -- Support for SAX2 parsers" url="lib/module-xml.sax.html"> +<tocsect4 name="13.5.1 SAXException Objects " url="lib/sax-exception-objects.html"/> +</tocsect3> +<tocsect3 name="13.6 xml.sax.handler -- Base classes for SAX handlers" url="lib/module-xml.sax.handler.html"> +<tocsect4 name="13.6.1 ContentHandler Objects " url="lib/content-handler-objects.html"/> +<tocsect4 name="13.6.2 DTDHandler Objects " url="lib/dtd-handler-objects.html"/> +<tocsect4 name="13.6.3 EntityResolver Objects " url="lib/entity-resolver-objects.html"/> +</tocsect3> +<tocsect3 name="13.7 xml.sax.saxutils -- SAX Utilities" url="lib/module-xml.sax.saxutils.html"/> +<tocsect3 name="13.8 xml.sax.xmlreader -- Interface for XML parsers" url="lib/module-xml.sax.xmlreader.html"> +<tocsect4 name="13.8.1 XMLReader Objects " url="lib/xmlreader-objects.html"/> +<tocsect4 name="13.8.2 IncrementalParser Objects " url="lib/incremental-parser-objects.html"/> +<tocsect4 name="13.8.3 Locator Objects " url="lib/locator-objects.html"/> +<tocsect4 name="13.8.4 InputSource Objects " url="lib/input-source-objects.html"/> +<tocsect4 name="13.8.5 AttributesImpl Objects " url="lib/attributes-impl-objects.html"/> +<tocsect4 name="13.8.6 AttributesNSImpl Objects " url="lib/attributes-ns-impl-objects.html"/> +</tocsect3> +<tocsect3 name="13.9 xmllib -- A parser for XML documents" url="lib/module-xmllib.html"> +<tocsect4 name="13.9.1 XML Namespaces " url="lib/xml-namespace.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="14. Multimedia Services" url="lib/mmedia.html"> +<tocsect3 name="14.1 audioop -- Manipulate raw audio data" url="lib/module-audioop.html"/> +<tocsect3 name="14.2 imageop -- Manipulate raw image data" url="lib/module-imageop.html"/> +<tocsect3 name="14.3 aifc -- Read and write AIFF and AIFC files" url="lib/module-aifc.html"/> +<tocsect3 name="14.4 sunau -- Read and write Sun AU files" url="lib/module-sunau.html"> +<tocsect4 name="14.4.1 AU_read Objects " url="lib/au-read-objects.html"/> +<tocsect4 name="14.4.2 AU_write Objects " url="lib/au-write-objects.html"/> +</tocsect3> +<tocsect3 name="14.5 wave -- Read and write WAV files" url="lib/module-wave.html"> +<tocsect4 name="14.5.1 Wave_read Objects " url="lib/Wave-read-objects.html"/> +<tocsect4 name="14.5.2 Wave_write Objects " url="lib/Wave-write-objects.html"/> +</tocsect3> +<tocsect3 name="14.6 chunk -- Read IFF chunked data" url="lib/module-chunk.html"/> +<tocsect3 name="14.7 colorsys -- Conversions between color systems" url="lib/module-colorsys.html"/> +<tocsect3 name="14.8 rgbimg -- Read and write ``SGI RGB'' files" url="lib/module-rgbimg.html"/> +<tocsect3 name="14.9 imghdr -- Determine the type of an image" url="lib/module-imghdr.html"/> +<tocsect3 name="14.10 sndhdr -- Determine type of sound file" url="lib/module-sndhdr.html"/> +</tocsect2> +<tocsect2 name="15. Cryptographic Services" url="lib/crypto.html"> +<tocsect3 name="15.1 md5 -- MD5 message digest algorithm" url="lib/module-md5.html"/> +<tocsect3 name="15.2 sha -- SHA message digest algorithm" url="lib/module-sha.html"/> +<tocsect3 name="15.3 mpz -- GNU arbitrary magnitude integers" url="lib/module-mpz.html"/> +<tocsect3 name="15.4 rotor -- Enigma-like encryption and decryption" url="lib/module-rotor.html"/> +</tocsect2> +<tocsect2 name="16. Restricted Execution " url="lib/restricted.html"> +<tocsect3 name="16.1 rexec -- Restricted execution framework" url="lib/module-rexec.html"> +<tocsect4 name="16.1.1 An example" url="lib/node366.html"/> +</tocsect3> +<tocsect3 name="16.2 Bastion -- Restricting access to objects" url="lib/module-Bastion.html"/> +</tocsect2> +<tocsect2 name="17. Python Language Services " url="lib/language.html"> +<tocsect3 name="17.1 parser -- Access Python parse trees" url="lib/module-parser.html"> +<tocsect4 name="17.1.1 Creating AST Objects " url="lib/Creating_ASTs.html"/> +<tocsect4 name="17.1.2 Converting AST Objects " url="lib/Converting_ASTs.html"/> +<tocsect4 name="17.1.3 Queries on AST Objects " url="lib/Querying_ASTs.html"/> +<tocsect4 name="17.1.4 Exceptions and Error Handling " url="lib/AST_Errors.html"/> +<tocsect4 name="17.1.5 AST Objects " url="lib/AST_Objects.html"/> +<tocsect4 name="17.1.6 Examples " url="lib/AST_Examples.html"/> +</tocsect3> +<tocsect3 name="17.2 symbol -- Constants used with Python parse trees" url="lib/module-symbol.html"/> +<tocsect3 name="17.3 token -- Constants used with Python parse trees" url="lib/module-token.html"/> +<tocsect3 name="17.4 keyword -- Testing for Python keywords" url="lib/module-keyword.html"/> +<tocsect3 name="17.5 tokenize -- Tokenizer for Python source" url="lib/module-tokenize.html"/> +<tocsect3 name="17.6 tabnanny -- Detection of ambiguous indentation" url="lib/module-tabnanny.html"/> +<tocsect3 name="17.7 pyclbr -- Python class browser support" url="lib/module-pyclbr.html"> +<tocsect4 name="17.7.1 Class Descriptor Objects " url="lib/pyclbr-class-objects.html"/> +</tocsect3> +<tocsect3 name="17.8 py_compile -- Compile Python source files" url="lib/module-pycompile.html"/> +<tocsect3 name="17.9 compileall -- Byte-compile Python libraries" url="lib/module-compileall.html"/> +<tocsect3 name="17.10 dis -- Disassembler for Python byte code" url="lib/module-dis.html"> +<tocsect4 name="17.10.1 Python Byte Code Instructions" url="lib/bytecodes.html"/> +</tocsect3> +</tocsect2> +<tocsect2 name="18. SGI IRIX Specific Services" url="lib/sgi.html"> +<tocsect3 name="18.1 al -- Audio functions on the SGI" url="lib/module-al.html"> +<tocsect4 name="18.1.1 Configuration Objects " url="lib/al-config-objects.html"/> +<tocsect4 name="18.1.2 Port Objects " url="lib/al-port-objects.html"/> +</tocsect3> +<tocsect3 name="18.2 AL -- Constants used with the al module" url="lib/module-al-constants.html"/> +<tocsect3 name="18.3 cd -- CD-ROM access on SGI systems" url="lib/module-cd.html"> +<tocsect4 name="18.3.1 Player Objects" url="lib/player-objects.html"/> +<tocsect4 name="18.3.2 Parser Objects" url="lib/cd-parser-objects.html"/> +</tocsect3> +<tocsect3 name="18.4 fl -- FORMS library interface for GUI applications" url="lib/module-fl.html"> +<tocsect4 name="18.4.1 Functions Defined in Module fl" url="lib/FL_Functions.html"/> +<tocsect4 name="18.4.2 Form Objects" url="lib/form-objects.html"/> +<tocsect4 name="18.4.3 FORMS Objects" url="lib/forms-objects.html"/> +</tocsect3> +<tocsect3 name="18.5 FL -- Constants used with the fl module" url="lib/module-fl-constants.html"/> +<tocsect3 name="18.6 flp -- Functions for loading stored FORMS designs" url="lib/module-flp.html"/> +<tocsect3 name="18.7 fm -- Font Manager interface" url="lib/module-fm.html"/> +<tocsect3 name="18.8 gl -- Graphics Library interface" url="lib/module-gl.html"/> +<tocsect3 name="18.9 DEVICE -- Constants used with the gl module" url="lib/module-DEVICE.html"/> +<tocsect3 name="18.10 GL -- Constants used with the gl module" url="lib/module-gl-constants.html"/> +<tocsect3 name="18.11 imgfile -- Support for SGI imglib files" url="lib/module-imgfile.html"/> +<tocsect3 name="18.12 jpeg -- Read and write JPEG files" url="lib/module-jpeg.html"/> +</tocsect2> +<tocsect2 name="19. SunOS Specific Services" url="lib/sunos.html"> +<tocsect3 name="19.1 sunaudiodev -- Access to Sun audio hardware" url="lib/module-sunaudiodev.html"> +<tocsect4 name="19.1.1 Audio Device Objects " url="lib/audio-device-objects.html"/> +</tocsect3> +<tocsect3 name="19.2 SUNAUDIODEV -- Constants used with sunaudiodev" url="lib/module-sunaudiodev-constants.html"/> +</tocsect2> +<tocsect2 name="20. MS Windows Specific Services" url="lib/node413.html"> +<tocsect3 name="20.1 msvcrt - Useful routines from the MS VC++ runtime" url="lib/module-msvcrt.html"> +<tocsect4 name="20.1.1 File Operations " url="lib/msvcrt-files.html"/> +<tocsect4 name="20.1.2 Console I/O " url="lib/msvcrt-console.html"/> +<tocsect4 name="20.1.3 Other Functions " url="lib/msvcrt-other.html"/> +</tocsect3> +<tocsect3 name="20.2 _winreg - Windows registry access" url="lib/module--winreg.html"> +<tocsect4 name="20.2.1 Registry handle objects " url="lib/handle-object.html"/> +</tocsect3> +<tocsect3 name="20.3 winsound -- Sound-playing interface for Windows" url="lib/module-winsound.html"/> +</tocsect2> +<tocsect2 name="A. Undocumented Modules " url="lib/undoc.html"> +<tocsect3 name="A.1 Frameworks" url="lib/node422.html"/> +<tocsect3 name="A.2 Miscellaneous useful utilities" url="lib/node423.html"/> +<tocsect3 name="A.3 Platform specific modules" url="lib/node424.html"/> +<tocsect3 name="A.4 Multimedia" url="lib/node425.html"/> +<tocsect3 name="A.5 Obsolete " url="lib/obsolete-modules.html"/> +<tocsect3 name="A.6 SGI-specific Extension modules" url="lib/node427.html"/> +</tocsect2> +<tocsect2 name="B. Reporting Bugs" url="lib/reporting-bugs.html"/> +<tocsect2 name="Module Index" url="lib/modindex.html"/> +<tocsect2 name="Index" url="lib/genindex.html"/> +<tocsect2 name="About this document ..." url="lib/about.html"/> +</tocsect1> + +<index> +<entry name="__abs__() (numeric object method)" url="ref/numeric-types.html#l2h-209"/> +<entry name="__add__() (numeric object method)" url="ref/numeric-types.html#l2h-183"/> +<entry name="__add__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__and__() (numeric object method)" url="ref/numeric-types.html#l2h-192"/> +<entry name="__bases__ (class attribute)" url="ref/types.html#l2h-47"/> +<entry name="__builtin__ (built-in module)" url="ref/execframes.html#l2h-247"/> +<entry name="__builtins__" url="ref/exec.html#l2h-399"/> +<entry name="__call__() (object method)" url="ref/callable-types.html#l2h-163"/> +<entry name="__class__ (instance attribute)" url="ref/types.html#l2h-49"/> +<entry name="__cmp__() (object method)" url="ref/customization.html#l2h-137"/> +<entry name="__coerce__() (numeric object method)" url="ref/sequence-types.html#l2h-170"/> +<entry name="__complex__() (numeric object method)" url="ref/numeric-types.html#l2h-211"/> +<entry name="__contains__() (sequence object method)" url="ref/sequence-methods.html#l2h-182"/> +<entry name="__debug__" url="ref/assert.html#l2h-340"/> +<entry name="__del__() (object method)" url="ref/customization.html#l2h-134"/> +<entry name="__delattr__() (object method)" url="ref/attribute-access.html#l2h-162"/> +<entry name="__delitem__() (mapping object method)" url="ref/sequence-types.html#l2h-176"/> +<entry name="__delslice__() (sequence object method)" url="ref/sequence-methods.html#l2h-181"/> +<entry name="__dict__ (class attribute)" url="ref/types.html#l2h-47"/> +<entry name="__dict__ (instance attribute)" url="ref/types.html#l2h-49"/> +<entry name="__dict__ (module attribute)" url="ref/types.html#l2h-43"/> +<entry name="__div__() (numeric object method)" url="ref/numeric-types.html#l2h-186"/> +<entry name="__divmod__() (numeric object method)" url="ref/numeric-types.html#l2h-188"/> +<entry name="__doc__ (class attribute)" url="ref/types.html#l2h-47"/> +<entry name="__doc__ (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="__doc__ (module attribute)" url="ref/types.html#l2h-45"/> +<entry name="__file__ (module attribute)" url="ref/types.html#l2h-45"/> +<entry name="__float__() (numeric object method)" url="ref/numeric-types.html#l2h-214"/> +<entry name="__getattr__() (object method)" url="ref/attribute-access.html#l2h-156"/> +<entry name="__getitem__() (mapping object method)" url="ref/specialnames.html#l2h-132"/> +<entry name="__getslice__() (sequence object method)" url="ref/sequence-methods.html#l2h-179"/> +<entry name="__hash__() (object method)" url="ref/customization.html#l2h-139"/> +<entry name="__hex__() (numeric object method)" url="ref/numeric-types.html#l2h-216"/> +<entry name="__iadd__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__import__() (built-in function)" url="ref/import.html#l2h-394"/> +<entry name="__imul__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__init__() (object method)" url="ref/types.html#l2h-41"/> +<entry name="__init__.py" url="ref/import.html#l2h-393"/> +<entry name="__int__() (numeric object method)" url="ref/numeric-types.html#l2h-212"/> +<entry name="__invert__() (numeric object method)" url="ref/numeric-types.html#l2h-210"/> +<entry name="__len__() (mapping object method)" url="ref/customization.html#l2h-144"/> +<entry name="__long__() (numeric object method)" url="ref/numeric-types.html#l2h-213"/> +<entry name="__lshift__() (numeric object method)" url="ref/numeric-types.html#l2h-190"/> +<entry name="__main__ (built-in module)" url="ref/execframes.html#l2h-235"/> +<entry name="__members__ (built-in object attribute)" url="ref/types.html#l2h-31"/> +<entry name="__methods__ (built-in object attribute)" url="ref/types.html#l2h-31"/> +<entry name="__mod__() (numeric object method)" url="ref/numeric-types.html#l2h-187"/> +<entry name="__module__ (class attribute)" url="ref/types.html#l2h-47"/> +<entry name="__mul__() (numeric object method)" url="ref/numeric-types.html#l2h-185"/> +<entry name="__mul__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__name__ (class attribute)" url="ref/types.html#l2h-47"/> +<entry name="__name__ (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="__name__ (module attribute)" url="ref/types.html#l2h-45"/> +<entry name="__neg__() (numeric object method)" url="ref/numeric-types.html#l2h-207"/> +<entry name="__nonzero__() (object method)" url="ref/customization.html#l2h-142"/> +<entry name="__oct__() (numeric object method)" url="ref/numeric-types.html#l2h-215"/> +<entry name="__or__() (numeric object method)" url="ref/numeric-types.html#l2h-194"/> +<entry name="__pos__() (numeric object method)" url="ref/numeric-types.html#l2h-208"/> +<entry name="__pow__() (numeric object method)" url="ref/numeric-types.html#l2h-189"/> +<entry name="__radd__() (numeric object method)" url="ref/numeric-types.html#l2h-195"/> +<entry name="__radd__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__rand__() (numeric object method)" url="ref/numeric-types.html#l2h-204"/> +<entry name="__rcmp__() (object method)" url="ref/customization.html#l2h-138"/> +<entry name="__rdiv__() (numeric object method)" url="ref/numeric-types.html#l2h-198"/> +<entry name="__rdivmod__() (numeric object method)" url="ref/numeric-types.html#l2h-200"/> +<entry name="__repr__() (object method)" url="ref/customization.html#l2h-135"/> +<entry name="__rlshift__() (numeric object method)" url="ref/numeric-types.html#l2h-202"/> +<entry name="__rmod__() (numeric object method)" url="ref/numeric-types.html#l2h-199"/> +<entry name="__rmul__() (numeric object method)" url="ref/numeric-types.html#l2h-197"/> +<entry name="__rmul__() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="__ror__() (numeric object method)" url="ref/numeric-types.html#l2h-206"/> +<entry name="__rpow__() (numeric object method)" url="ref/numeric-types.html#l2h-201"/> +<entry name="__rrshift__() (numeric object method)" url="ref/numeric-types.html#l2h-203"/> +<entry name="__rshift__() (numeric object method)" url="ref/numeric-types.html#l2h-191"/> +<entry name="__rsub__() (numeric object method)" url="ref/numeric-types.html#l2h-196"/> +<entry name="__rxor__() (numeric object method)" url="ref/numeric-types.html#l2h-205"/> +<entry name="__setattr__() (object method)" url="ref/attribute-access.html#l2h-158"/> +<entry name="__setitem__() (mapping object method)" url="ref/sequence-types.html#l2h-175"/> +<entry name="__setslice__() (sequence object method)" url="ref/sequence-methods.html#l2h-180"/> +<entry name="__str__() (object method)" url="ref/customization.html#l2h-136"/> +<entry name="__sub__() (numeric object method)" url="ref/numeric-types.html#l2h-184"/> +<entry name="__xor__() (numeric object method)" url="ref/numeric-types.html#l2h-193"/> +<entry name="abs() (built-in function)" url="ref/numeric-types.html#l2h-224"/> +<entry name="addition" url="ref/binary.html#l2h-311"/> +<entry name="and, bit-wise" url="ref/bitwise.html#l2h-316"/> +<entry name="and operator" url="ref/lambda.html#l2h-326"/> +<entry name="anonmymous, function" url="ref/lambda.html#l2h-328"/> +<entry name="append() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="argument, function" url="ref/types.html#l2h-102"/> +<entry name="arithmetic, conversion" url="ref/conversions.html#l2h-260"/> +<entry name="arithmetic, operation, binary" url="ref/binary.html#l2h-307"/> +<entry name="arithmetic, operation, unary" url="ref/unary.html#l2h-302"/> +<entry name="array (standard module)" url="ref/types.html#l2h-94"/> +<entry name="ASCII" url="ref/notation.html#l2h-2"/> +<entry name="assert statement" url="ref/assert.html#l2h-338"/> +<entry name="AssertionError exception" url="ref/assert.html#l2h-341"/> +<entry name="assertions, debugging" url="ref/assert.html#l2h-339"/> +<entry name="assignment, attribute" url="ref/assignment.html#l2h-343"/> +<entry name="assignment, augmented" url="ref/augassign.html#l2h-354"/> +<entry name="assignment, class attribute" url="ref/types.html#l2h-112"/> +<entry name="assignment (continued), class instance attribute" url="ref/types.html#l2h-115"/> +<entry name="assignment (continued), slicing" url="ref/assignment.html#l2h-353"/> +<entry name="assignment (continued), statement" url="ref/types.html#l2h-92"/> +<entry name="assignment (continued), subscription" url="ref/assignment.html#l2h-350"/> +<entry name="assignment (continued), target list" url="ref/assignment.html#l2h-346"/> +<entry name="atom" url="ref/atoms.html#l2h-261"/> +<entry name="attribute" url="ref/types.html#l2h-69"/> +<entry name="assignment" url="ref/assignment.html#l2h-343"/> +<entry name="assignment, class" url="ref/types.html#l2h-112"/> +<entry name="assignment, class instance" url="ref/types.html#l2h-115"/> +<entry name="class" url="ref/types.html#l2h-111"/> +<entry name="class instance" url="ref/types.html#l2h-114"/> +<entry name="deletion" url="ref/del.html#l2h-360"/> +<entry name="generic special" url="ref/types.html#l2h-69"/> +<entry name="reference" url="ref/attribute-references.html#l2h-282"/> +<entry name="special" url="ref/types.html#l2h-69"/> +<entry name="AttributeError exception" url="ref/attribute-references.html#l2h-283"/> +<entry name="augmented, assignment" url="ref/augassign.html#l2h-354"/> +<entry name="augmented, back-quotes" url="ref/customization.html#l2h-149"/> +<entry name="augmented, backslash character" url="ref/explicit-joining.html#l2h-7"/> +<entry name="backward, quotes" url="ref/customization.html#l2h-149"/> +<entry name="binary, arithmetic operation" url="ref/binary.html#l2h-307"/> +<entry name="binary, bit-wise operation" url="ref/bitwise.html#l2h-315"/> +<entry name="binding, global name" url="ref/global.html#l2h-396"/> +<entry name="binding, name" url="ref/execframes.html#l2h-241"/> +<entry name="bit-wise, and" url="ref/bitwise.html#l2h-316"/> +<entry name="bit-wise, operation, binary" url="ref/bitwise.html#l2h-315"/> +<entry name="bit-wise, operation, unary" url="ref/unary.html#l2h-302"/> +<entry name="bit-wise, or" url="ref/bitwise.html#l2h-318"/> +<entry name="bit-wise, xor" url="ref/bitwise.html#l2h-317"/> +<entry name="blank line" url="ref/blank-lines.html#l2h-8"/> +<entry name="block, code" url="ref/execframes.html#l2h-238"/> +<entry name="block, BNF" url="ref/notation.html#l2h-1"/> +<entry name="Boolean, operation" url="ref/lambda.html#l2h-324"/> +<entry name="break statement" url="ref/break.html#l2h-375"/> +<entry name="bsddb (standard module)" url="ref/types.html#l2h-100"/> +<entry name="built-in, method" url="ref/types.html#l2h-107"/> +<entry name="built-in, module" url="ref/import.html#l2h-386"/> +<entry name="built-in, name" url="ref/atom-identifiers.html#l2h-263"/> +<entry name="built-in function, call" url="ref/calls.html#l2h-298"/> +<entry name="built-in function object" url="ref/types.html#l2h-106"/> +<entry name="built-in method, call" url="ref/calls.html#l2h-298"/> +<entry name="built-in method object" url="ref/types.html#l2h-107"/> +<entry name="byte" url="ref/types.html#l2h-85"/> +<entry name="bytecode" url="ref/types.html#l2h-124"/> +<entry name="C" url="ref/strings.html#l2h-17"/> +<entry name="language" url="ref/types.html#l2h-68"/> +<entry name="call" url="ref/calls.html#l2h-293"/> +<entry name="built-in function" url="ref/calls.html#l2h-298"/> +<entry name="built-in method" url="ref/calls.html#l2h-298"/> +<entry name="class instance" url="ref/calls.html#l2h-300"/> +<entry name="class object" url="ref/types.html#l2h-108"/> +<entry name="function" url="ref/types.html#l2h-102"/> +<entry name="instance" url="ref/callable-types.html#l2h-164"/> +<entry name="method" url="ref/calls.html#l2h-298"/> +<entry name="procedure" url="ref/exprstmts.html#l2h-337"/> +<entry name="user-defined function" url="ref/calls.html#l2h-297"/> +<entry name="callable object" url="ref/types.html#l2h-101"/> +<entry name="chaining, comparisons" url="ref/comparisons.html#l2h-321"/> +<entry name="character" url="ref/types.html#l2h-85"/> +<entry name="character set" url="ref/types.html#l2h-86"/> +<entry name="chr() (built-in function)" url="ref/types.html#l2h-83"/> +<entry name="class, attribute" url="ref/types.html#l2h-111"/> +<entry name="class, attribute assignment" url="ref/types.html#l2h-112"/> +<entry name="class, constructor" url="ref/customization.html#l2h-145"/> +<entry name="class, definition" url="ref/return.html#l2h-370"/> +<entry name="class, instance" url="ref/types.html#l2h-114"/> +<entry name="class, name" url="ref/class.html#l2h-434"/> +<entry name="class instance, attribute" url="ref/types.html#l2h-114"/> +<entry name="class instance, attribute assignment" url="ref/types.html#l2h-115"/> +<entry name="class instance, call" url="ref/calls.html#l2h-300"/> +<entry name="class instance object" url="ref/types.html#l2h-108"/> +<entry name="class object" url="ref/types.html#l2h-108"/> +<entry name="call" url="ref/types.html#l2h-108"/> +<entry name="clause" url="ref/compound.html#l2h-403"/> +<entry name="clear() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="cmp() (built-in function)" url="ref/customization.html#l2h-152"/> +<entry name="co_argcount (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_code (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_consts (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_filename (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_firstlineno (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_flags (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_lnotab (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_name (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_names (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_nlocals (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_stacksize (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="co_varnames (code object attribute)" url="ref/types.html#l2h-57"/> +<entry name="code, block" url="ref/execframes.html#l2h-238"/> +<entry name="code block" url="ref/execframes.html#l2h-232"/> +<entry name="code object" url="ref/types.html#l2h-124"/> +<entry name="comma" url="ref/parenthesized.html#l2h-270"/> +<entry name="trailing" url="ref/exprlists.html#l2h-331"/> +<entry name="command line" url="ref/programs.html#l2h-439"/> +<entry name="comment" url="ref/comments.html#l2h-6"/> +<entry name="comparison" url="ref/comparisons.html#l2h-319"/> +<entry name="string" url="ref/types.html#l2h-86"/> +<entry name="comparisons" url="ref/customization.html#l2h-152"/> +<entry name="chaining" url="ref/comparisons.html#l2h-321"/> +<entry name="compile() (built-in function)" url="ref/global.html#l2h-397"/> +<entry name="complex, number" url="ref/types.html#l2h-78"/> +<entry name="complex() (built-in function)" url="ref/numeric-types.html#l2h-225"/> +<entry name="complex literal" url="ref/numbers.html#l2h-20"/> +<entry name="complex object" url="ref/types.html#l2h-78"/> +<entry name="compound, statement" url="ref/compound.html#l2h-402"/> +<entry name="comprehensions, list" url="ref/lists.html#l2h-271"/> +<entry name="constant" url="ref/literals.html#l2h-13"/> +<entry name="constructor, class" url="ref/customization.html#l2h-145"/> +<entry name="container" url="ref/objects.html#l2h-29"/> +<entry name="continue statement" url="ref/continue.html#l2h-380"/> +<entry name="conversion, arithmetic" url="ref/conversions.html#l2h-260"/> +<entry name="conversion, string" url="ref/customization.html#l2h-149"/> +<entry name="copy() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="count() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="dangling, else" url="ref/compound.html#l2h-406"/> +<entry name="data" url="ref/objects.html#l2h-24"/> +<entry name="type" url="ref/types.html#l2h-68"/> +<entry name="type, immutable" url="ref/atom-literals.html#l2h-267"/> +<entry name="datum" url="ref/dict.html#l2h-275"/> +<entry name="dbm (standard module)" url="ref/types.html#l2h-98"/> +<entry name="debugging, assertions" url="ref/assert.html#l2h-339"/> +<entry name="decimal literal" url="ref/numbers.html#l2h-20"/> +<entry name="DEDENT token" url="ref/indentation.html#l2h-10"/> +<entry name="default, parameter value" url="ref/function.html#l2h-430"/> +<entry name="definition, class" url="ref/return.html#l2h-370"/> +<entry name="definition, function" url="ref/return.html#l2h-370"/> +<entry name="del statement" url="ref/types.html#l2h-92"/> +<entry name="delete" url="ref/types.html#l2h-92"/> +<entry name="deletion, attribute" url="ref/del.html#l2h-360"/> +<entry name="deletion, target" url="ref/del.html#l2h-358"/> +<entry name="deletion, target list" url="ref/del.html#l2h-358"/> +<entry name="delimiters" url="ref/delimiters.html#l2h-22"/> +<entry name="destructor" url="ref/customization.html#l2h-146"/> +<entry name="dictionary, display" url="ref/dict.html#l2h-274"/> +<entry name="dictionary object" url="ref/types.html#l2h-96"/> +<entry name="display, dictionary" url="ref/dict.html#l2h-274"/> +<entry name="display, list" url="ref/lists.html#l2h-271"/> +<entry name="display, tuple" url="ref/parenthesized.html#l2h-270"/> +<entry name="division" url="ref/binary.html#l2h-309"/> +<entry name="divmod() (built-in function)" url="ref/numeric-types.html#l2h-218"/> +<entry name="documentation string" url="ref/types.html#l2h-125"/> +<entry name="EBCDIC" url="ref/types.html#l2h-86"/> +<entry name="elif, keyword" url="ref/if.html#l2h-408"/> +<entry name="Ellipsis" url="ref/types.html#l2h-71"/> +<entry name="Ellipsis object" url="ref/types.html#l2h-71"/> +<entry name="else, dangling" url="ref/compound.html#l2h-406"/> +<entry name="else, keyword" url="ref/break.html#l2h-377"/> +<entry name="empty, list" url="ref/lists.html#l2h-273"/> +<entry name="empty, tuple" url="ref/types.html#l2h-91"/> +<entry name="error handling" url="ref/exceptions.html#l2h-255"/> +<entry name="errors" url="ref/exceptions.html#l2h-255"/> +<entry name="escape sequence" url="ref/strings.html#l2h-17"/> +<entry name="eval() (built-in function)" url="ref/global.html#l2h-397"/> +<entry name="exc_info (in module sys)" url="ref/types.html#l2h-63"/> +<entry name="exc_traceback (in module sys)" url="ref/types.html#l2h-63"/> +<entry name="exc_type (in module sys)" url="ref/try.html#l2h-419"/> +<entry name="exc_value (in module sys)" url="ref/try.html#l2h-419"/> +<entry name="except, keyword" url="ref/try.html#l2h-421"/> +<entry name="exception" url="ref/exceptions.html#l2h-250"/> +<entry name="AssertionError" url="ref/assert.html#l2h-341"/> +<entry name="AttributeError" url="ref/attribute-references.html#l2h-283"/> +<entry name="handler" url="ref/types.html#l2h-127"/> +<entry name="ImportError" url="ref/import.html#l2h-387"/> +<entry name="NameError" url="ref/atom-identifiers.html#l2h-264"/> +<entry name="exception (continued), raising" url="ref/raise.html#l2h-373"/> +<entry name="exception (continued), RuntimeError" url="ref/print.html#l2h-367"/> +<entry name="exception (continued), SyntaxError" url="ref/import.html#l2h-387"/> +<entry name="exception (continued), TypeError" url="ref/unary.html#l2h-306"/> +<entry name="exception (continued), ValueError" url="ref/shifting.html#l2h-314"/> +<entry name="exception (continued), ZeroDivisionError" url="ref/binary.html#l2h-309"/> +<entry name="exception handler" url="ref/exceptions.html#l2h-255"/> +<entry name="exclusive, or" url="ref/bitwise.html#l2h-317"/> +<entry name="exec statement" url="ref/execframes.html#l2h-249"/> +<entry name="execfile() (built-in function)" url="ref/global.html#l2h-397"/> +<entry name="execution, frame" url="ref/execframes.html#l2h-237"/> +<entry name="execution, restricted" url="ref/execframes.html#l2h-248"/> +<entry name="execution, stack" url="ref/types.html#l2h-127"/> +<entry name="execution model" url="ref/execmodel.html#l2h-231"/> +<entry name="expression" url="ref/expressions.html#l2h-257"/> +<entry name="lambda" url="ref/lambda.html#l2h-328"/> +<entry name="list" url="ref/exprlists.html#l2h-329"/> +<entry name="statement" url="ref/exprstmts.html#l2h-334"/> +<entry name="extended, slicing" url="ref/slicings.html#l2h-292"/> +<entry name="extended print statement" url="ref/print.html#l2h-368"/> +<entry name="extension, filename" url="ref/import.html#l2h-386"/> +<entry name="extension, module" url="ref/types.html#l2h-68"/> +<entry name="extension, f_back (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_builtins (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_code (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_exc_traceback (frame attribute)" url="ref/types.html#l2h-61"/> +<entry name="extension, f_exc_type (frame attribute)" url="ref/types.html#l2h-61"/> +<entry name="extension, f_exc_value (frame attribute)" url="ref/types.html#l2h-61"/> +<entry name="extension, f_globals (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_lasti (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_lineno (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_locals (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_restricted (frame attribute)" url="ref/types.html#l2h-59"/> +<entry name="extension, f_trace (frame attribute)" url="ref/types.html#l2h-61"/> +<entry name="extension, file object" url="ref/types.html#l2h-117"/> +<entry name="filename, extension" url="ref/import.html#l2h-386"/> +<entry name="finally, keyword" url="ref/return.html#l2h-371"/> +<entry name="float() (built-in function)" url="ref/numeric-types.html#l2h-228"/> +<entry name="floating point, number" url="ref/types.html#l2h-77"/> +<entry name="floating point literal" url="ref/numbers.html#l2h-20"/> +<entry name="floating point object" url="ref/types.html#l2h-77"/> +<entry name="for statement" url="ref/break.html#l2h-376"/> +<entry name="form, lambda" url="ref/lambda.html#l2h-328"/> +<entry name="frame, execution" url="ref/execframes.html#l2h-237"/> +<entry name="frame object" url="ref/types.html#l2h-126"/> +<entry name="from, keyword" url="ref/import.html#l2h-385"/> +<entry name="from statement" url="ref/execframes.html#l2h-249"/> +<entry name="func_code (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="func_defaults (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="func_doc (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="func_globals (function attribute)" url="ref/types.html#l2h-35"/> +<entry name="function, anonmymous" url="ref/lambda.html#l2h-328"/> +<entry name="function, argument" url="ref/types.html#l2h-102"/> +<entry name="function, call" url="ref/types.html#l2h-102"/> +<entry name="function, call, user-defined" url="ref/calls.html#l2h-297"/> +<entry name="function, definition" url="ref/return.html#l2h-370"/> +<entry name="function, name" url="ref/function.html#l2h-429"/> +<entry name="function, user-defined" url="ref/types.html#l2h-103"/> +<entry name="function object" url="ref/types.html#l2h-103"/> +<entry name="garbage collection" url="ref/objects.html#l2h-28"/> +<entry name="gdbm (standard module)" url="ref/types.html#l2h-99"/> +<entry name="generic, special attribute" url="ref/types.html#l2h-69"/> +<entry name="get() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="global, name" url="ref/atom-identifiers.html#l2h-263"/> +<entry name="global, name binding" url="ref/global.html#l2h-396"/> +<entry name="global (continued), namespace" url="ref/types.html#l2h-104"/> +<entry name="global statement" url="ref/execframes.html#l2h-246"/> +<entry name="globals() (built-in function)" url="ref/exec.html#l2h-400"/> +<entry name="grammar" url="ref/notation.html#l2h-1"/> +<entry name="grouping" url="ref/indentation.html#l2h-9"/> +<entry name="handle an exception" url="ref/exceptions.html#l2h-254"/> +<entry name="handler, exception" url="ref/types.html#l2h-127"/> +<entry name="has_key() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="hash() (built-in function)" url="ref/customization.html#l2h-155"/> +<entry name="hash character" url="ref/comments.html#l2h-6"/> +<entry name="hex() (built-in function)" url="ref/numeric-types.html#l2h-230"/> +<entry name="hexadecimal literal" url="ref/numbers.html#l2h-20"/> +<entry name="hierarchical, module names" url="ref/import.html#l2h-391"/> +<entry name="hierarchy, type" url="ref/types.html#l2h-68"/> +<entry name="hierarchy, id() (built-in function)" url="ref/objects.html#l2h-25"/> +<entry name="hierarchy, identifier" url="ref/identifiers.html#l2h-11"/> +<entry name="identity, test" url="ref/comparisons.html#l2h-323"/> +<entry name="identity of an object" url="ref/objects.html#l2h-27"/> +<entry name="if statement" url="ref/if.html#l2h-407"/> +<entry name="im_class (method attribute)" url="ref/types.html#l2h-39"/> +<entry name="im_func (method attribute)" url="ref/types.html#l2h-37"/> +<entry name="im_self (method attribute)" url="ref/types.html#l2h-37"/> +<entry name="imaginary literal" url="ref/numbers.html#l2h-20"/> +<entry name="immutable, data type" url="ref/atom-literals.html#l2h-267"/> +<entry name="immutable, object" url="ref/atom-literals.html#l2h-267"/> +<entry name="immutable object" url="ref/objects.html#l2h-27"/> +<entry name="immutable sequence object" url="ref/types.html#l2h-82"/> +<entry name="import statement" url="ref/types.html#l2h-109"/> +<entry name="ImportError exception" url="ref/import.html#l2h-387"/> +<entry name="importing, module" url="ref/import.html#l2h-385"/> +<entry name="in, keyword" url="ref/for.html#l2h-414"/> +<entry name="in operator" url="ref/comparisons.html#l2h-322"/> +<entry name="inclusive, or" url="ref/bitwise.html#l2h-318"/> +<entry name="INDENT token" url="ref/indentation.html#l2h-10"/> +<entry name="indentation" url="ref/indentation.html#l2h-9"/> +<entry name="index() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="index operation" url="ref/types.html#l2h-80"/> +<entry name="inheritance" url="ref/class.html#l2h-434"/> +<entry name="initialization, module" url="ref/import.html#l2h-387"/> +<entry name="input" url="ref/expression-input.html#l2h-440"/> +<entry name="raw" url="ref/expression-input.html#l2h-445"/> +<entry name="input() (built-in function)" url="ref/expression-input.html#l2h-444"/> +<entry name="insert() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="instance, call" url="ref/callable-types.html#l2h-164"/> +<entry name="instance, class" url="ref/types.html#l2h-114"/> +<entry name="instance object" url="ref/types.html#l2h-108"/> +<entry name="int() (built-in function)" url="ref/numeric-types.html#l2h-226"/> +<entry name="integer" url="ref/types.html#l2h-90"/> +<entry name="representation" url="ref/types.html#l2h-76"/> +<entry name="integer literal" url="ref/numbers.html#l2h-20"/> +<entry name="integer object" url="ref/types.html#l2h-73"/> +<entry name="interactive mode" url="ref/programs.html#l2h-438"/> +<entry name="internal type" url="ref/types.html#l2h-123"/> +<entry name="interpreter" url="ref/top-level.html#l2h-435"/> +<entry name="inversion" url="ref/unary.html#l2h-305"/> +<entry name="invocation" url="ref/types.html#l2h-102"/> +<entry name="is not operator" url="ref/comparisons.html#l2h-323"/> +<entry name="is operator" url="ref/comparisons.html#l2h-323"/> +<entry name="item, sequence" url="ref/subscriptions.html#l2h-286"/> +<entry name="item, string" url="ref/subscriptions.html#l2h-287"/> +<entry name="item selection" url="ref/types.html#l2h-80"/> +<entry name="items() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="key" url="ref/dict.html#l2h-275"/> +<entry name="key/datum pair" url="ref/dict.html#l2h-275"/> +<entry name="keys() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="keyword" url="ref/keywords.html#l2h-12"/> +<entry name="elif" url="ref/if.html#l2h-408"/> +<entry name="keyword (continued), else" url="ref/break.html#l2h-377"/> +<entry name="keyword (continued), except" url="ref/try.html#l2h-421"/> +<entry name="keyword (continued), finally" url="ref/return.html#l2h-371"/> +<entry name="keyword (continued), from" url="ref/import.html#l2h-385"/> +<entry name="keyword (continued), in" url="ref/for.html#l2h-414"/> +<entry name="lambda, expression" url="ref/lambda.html#l2h-328"/> +<entry name="lambda, form" url="ref/lambda.html#l2h-328"/> +<entry name="language, C" url="ref/types.html#l2h-68"/> +<entry name="language, Pascal" url="ref/for.html#l2h-416"/> +<entry name="last_traceback (in module sys)" url="ref/types.html#l2h-63"/> +<entry name="leading whitespace" url="ref/indentation.html#l2h-9"/> +<entry name="len() (built-in function)" url="ref/types.html#l2h-79"/> +<entry name="lexical analysis" url="ref/lexical.html#l2h-3"/> +<entry name="lexical definitions" url="ref/notation.html#l2h-2"/> +<entry name="line continuation" url="ref/explicit-joining.html#l2h-7"/> +<entry name="line joining" url="ref/logical.html#l2h-5"/> +<entry name="line structure" url="ref/line-structure.html#l2h-4"/> +<entry name="list, assignment, target" url="ref/assignment.html#l2h-346"/> +<entry name="list, comprehensions" url="ref/lists.html#l2h-271"/> +<entry name="list, deletion target" url="ref/del.html#l2h-358"/> +<entry name="list (continued), display" url="ref/lists.html#l2h-271"/> +<entry name="list (continued), empty" url="ref/lists.html#l2h-273"/> +<entry name="list (continued), expression" url="ref/exprlists.html#l2h-329"/> +<entry name="list (continued), target" url="ref/assignment.html#l2h-345"/> +<entry name="list object" url="ref/types.html#l2h-93"/> +<entry name="literal" url="ref/literals.html#l2h-13"/> +<entry name="local, namespace" url="ref/execframes.html#l2h-244"/> +<entry name="locals() (built-in function)" url="ref/exec.html#l2h-400"/> +<entry name="logical line" url="ref/logical.html#l2h-5"/> +<entry name="long() (built-in function)" url="ref/numeric-types.html#l2h-227"/> +<entry name="long integer literal" url="ref/numbers.html#l2h-20"/> +<entry name="long integer object" url="ref/types.html#l2h-75"/> +<entry name="loop, over mutable sequence" url="ref/for.html#l2h-417"/> +<entry name="loop, statement" url="ref/break.html#l2h-376"/> +<entry name="loop control, target" url="ref/break.html#l2h-378"/> +<entry name="loop control, makefile() (socket method)" url="ref/types.html#l2h-53"/> +<entry name="mangling, name" url="ref/atom-identifiers.html#l2h-265"/> +<entry name="mapping object" url="ref/types.html#l2h-95"/> +<entry name="membership, test" url="ref/comparisons.html#l2h-322"/> +<entry name="method, built-in" url="ref/types.html#l2h-107"/> +<entry name="method, call" url="ref/calls.html#l2h-298"/> +<entry name="method, user-defined" url="ref/types.html#l2h-105"/> +<entry name="method object" url="ref/types.html#l2h-105"/> +<entry name="minus" url="ref/unary.html#l2h-303"/> +<entry name="module, built-in" url="ref/import.html#l2h-386"/> +<entry name="module, extension" url="ref/types.html#l2h-68"/> +<entry name="module, importing" url="ref/import.html#l2h-385"/> +<entry name="module, initialization" url="ref/import.html#l2h-387"/> +<entry name="module (continued), name" url="ref/import.html#l2h-386"/> +<entry name="module (continued), names, hierarchical" url="ref/import.html#l2h-391"/> +<entry name="module (continued), namespace" url="ref/types.html#l2h-110"/> +<entry name="module (continued), search path" url="ref/import.html#l2h-386"/> +<entry name="module (continued), user-defined" url="ref/import.html#l2h-386"/> +<entry name="module object" url="ref/types.html#l2h-109"/> +<entry name="modules (in module sys)" url="ref/import.html#l2h-383"/> +<entry name="modulo" url="ref/binary.html#l2h-310"/> +<entry name="multiplication" url="ref/binary.html#l2h-308"/> +<entry name="mutable object" url="ref/objects.html#l2h-27"/> +<entry name="mutable sequence, loop over" url="ref/for.html#l2h-417"/> +<entry name="mutable sequence object" url="ref/types.html#l2h-92"/> +<entry name="name" url="ref/identifiers.html#l2h-11"/> +<entry name="binding" url="ref/execframes.html#l2h-241"/> +<entry name="binding, global" url="ref/global.html#l2h-396"/> +<entry name="built-in" url="ref/atom-identifiers.html#l2h-263"/> +<entry name="class" url="ref/class.html#l2h-434"/> +<entry name="function" url="ref/function.html#l2h-429"/> +<entry name="global" url="ref/atom-identifiers.html#l2h-263"/> +<entry name="mangling" url="ref/atom-identifiers.html#l2h-265"/> +<entry name="module" url="ref/import.html#l2h-386"/> +<entry name="rebinding" url="ref/execframes.html#l2h-242"/> +<entry name="unbinding" url="ref/execframes.html#l2h-243"/> +<entry name="NameError exception" url="ref/atom-identifiers.html#l2h-264"/> +<entry name="names, hierarchical module" url="ref/import.html#l2h-391"/> +<entry name="names, private" url="ref/atom-identifiers.html#l2h-265"/> +<entry name="namespace" url="ref/execframes.html#l2h-232"/> +<entry name="global" url="ref/types.html#l2h-104"/> +<entry name="namespace (continued), local" url="ref/execframes.html#l2h-244"/> +<entry name="namespace (continued), module" url="ref/types.html#l2h-110"/> +<entry name="negation" url="ref/unary.html#l2h-303"/> +<entry name="newline, suppression" url="ref/print.html#l2h-365"/> +<entry name="NEWLINE token" url="ref/logical.html#l2h-5"/> +<entry name="None" url="ref/types.html#l2h-70"/> +<entry name="None object" url="ref/types.html#l2h-70"/> +<entry name="not in operator" url="ref/comparisons.html#l2h-322"/> +<entry name="not operator" url="ref/lambda.html#l2h-325"/> +<entry name="notation" url="ref/notation.html#l2h-1"/> +<entry name="null, operation" url="ref/pass.html#l2h-356"/> +<entry name="number" url="ref/numbers.html#l2h-20"/> +<entry name="complex" url="ref/types.html#l2h-78"/> +<entry name="floating point" url="ref/types.html#l2h-77"/> +<entry name="numeric literal" url="ref/numbers.html#l2h-20"/> +<entry name="numeric object" url="ref/types.html#l2h-72"/> +<entry name="object" url="ref/objects.html#l2h-24"/> +<entry name="built-in function" url="ref/types.html#l2h-106"/> +<entry name="built-in method" url="ref/types.html#l2h-107"/> +<entry name="callable" url="ref/types.html#l2h-101"/> +<entry name="class" url="ref/types.html#l2h-108"/> +<entry name="class instance" url="ref/types.html#l2h-108"/> +<entry name="code" url="ref/types.html#l2h-124"/> +<entry name="complex" url="ref/types.html#l2h-78"/> +<entry name="dictionary" url="ref/types.html#l2h-96"/> +<entry name="Ellipsis" url="ref/types.html#l2h-71"/> +<entry name="file" url="ref/types.html#l2h-117"/> +<entry name="floating point" url="ref/types.html#l2h-77"/> +<entry name="frame" url="ref/types.html#l2h-126"/> +<entry name="function" url="ref/types.html#l2h-103"/> +<entry name="immutable" url="ref/types.html#l2h-82"/> +<entry name="immutable sequence" url="ref/types.html#l2h-82"/> +<entry name="instance" url="ref/types.html#l2h-108"/> +<entry name="integer" url="ref/types.html#l2h-73"/> +<entry name="list" url="ref/types.html#l2h-93"/> +<entry name="long integer" url="ref/types.html#l2h-75"/> +<entry name="mapping" url="ref/types.html#l2h-95"/> +<entry name="method" url="ref/types.html#l2h-105"/> +<entry name="module" url="ref/types.html#l2h-109"/> +<entry name="mutable" url="ref/types.html#l2h-92"/> +<entry name="mutable sequence" url="ref/types.html#l2h-92"/> +<entry name="None" url="ref/types.html#l2h-70"/> +<entry name="numeric" url="ref/types.html#l2h-72"/> +<entry name="plain integer" url="ref/types.html#l2h-74"/> +<entry name="recursive" url="ref/string-conversions.html#l2h-279"/> +<entry name="sequence" url="ref/types.html#l2h-80"/> +<entry name="slice" url="ref/sequence-types.html#l2h-178"/> +<entry name="string" url="ref/types.html#l2h-85"/> +<entry name="object (continued), traceback" url="ref/types.html#l2h-127"/> +<entry name="object (continued), tuple" url="ref/types.html#l2h-91"/> +<entry name="object (continued), unicode" url="ref/types.html#l2h-90"/> +<entry name="object (continued), user-defined function" url="ref/types.html#l2h-103"/> +<entry name="object (continued), user-defined method" url="ref/types.html#l2h-105"/> +<entry name="oct() (built-in function)" url="ref/numeric-types.html#l2h-229"/> +<entry name="octal literal" url="ref/numbers.html#l2h-20"/> +<entry name="open() (built-in function)" url="ref/types.html#l2h-118"/> +<entry name="operation, binary arithmetic" url="ref/binary.html#l2h-307"/> +<entry name="operation, binary bit-wise" url="ref/bitwise.html#l2h-315"/> +<entry name="operation, Boolean" url="ref/lambda.html#l2h-324"/> +<entry name="operation, null" url="ref/pass.html#l2h-356"/> +<entry name="operation, shifting" url="ref/shifting.html#l2h-313"/> +<entry name="operation, unary arithmetic" url="ref/unary.html#l2h-302"/> +<entry name="operation, unary bit-wise" url="ref/unary.html#l2h-302"/> +<entry name="operator, and" url="ref/lambda.html#l2h-326"/> +<entry name="operator, in" url="ref/comparisons.html#l2h-322"/> +<entry name="operator, is" url="ref/comparisons.html#l2h-323"/> +<entry name="operator, is not" url="ref/comparisons.html#l2h-323"/> +<entry name="operator, not" url="ref/lambda.html#l2h-325"/> +<entry name="operator, not in" url="ref/comparisons.html#l2h-322"/> +<entry name="operator, or" url="ref/lambda.html#l2h-327"/> +<entry name="operator, precedence" url="ref/summary.html#l2h-332"/> +<entry name="operators" url="ref/operators.html#l2h-21"/> +<entry name="or, bit-wise" url="ref/bitwise.html#l2h-318"/> +<entry name="or, exclusive" url="ref/bitwise.html#l2h-317"/> +<entry name="or, inclusive" url="ref/bitwise.html#l2h-318"/> +<entry name="or operator" url="ref/lambda.html#l2h-327"/> +<entry name="ord() (built-in function)" url="ref/types.html#l2h-84"/> +<entry name="output" url="ref/exprstmts.html#l2h-337"/> +<entry name="standard" url="ref/exprstmts.html#l2h-337"/> +<entry name="OverflowError (built-in exception)" url="ref/types.html#l2h-33"/> +<entry name="packages" url="ref/import.html#l2h-392"/> +<entry name="parameter, value, default" url="ref/function.html#l2h-430"/> +<entry name="parenthesized form" url="ref/parenthesized.html#l2h-268"/> +<entry name="parser" url="ref/lexical.html#l2h-3"/> +<entry name="Pascal, language" url="ref/for.html#l2h-416"/> +<entry name="pass statement" url="ref/pass.html#l2h-355"/> +<entry name="path, module search" url="ref/import.html#l2h-386"/> +<entry name="physical line" url="ref/logical.html#l2h-5"/> +<entry name="plain integer literal" url="ref/numbers.html#l2h-20"/> +<entry name="plain integer object" url="ref/types.html#l2h-74"/> +<entry name="plus" url="ref/unary.html#l2h-304"/> +<entry name="pop() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="popen() (in module os)" url="ref/types.html#l2h-51"/> +<entry name="pow() (built-in function)" url="ref/numeric-types.html#l2h-219"/> +<entry name="precedence, operator" url="ref/summary.html#l2h-332"/> +<entry name="primary" url="ref/primaries.html#l2h-281"/> +<entry name="print statement" url="ref/customization.html#l2h-151"/> +<entry name="private, names" url="ref/atom-identifiers.html#l2h-265"/> +<entry name="procedure, call" url="ref/exprstmts.html#l2h-337"/> +<entry name="program" url="ref/programs.html#l2h-436"/> +<entry name="quotes, backward" url="ref/customization.html#l2h-149"/> +<entry name="quotes (continued), reverse" url="ref/customization.html#l2h-149"/> +<entry name="quotes (continued), raise an exception" url="ref/exceptions.html#l2h-253"/> +<entry name="quotes (continued), raise statement" url="ref/raise.html#l2h-372"/> +<entry name="raising, exception" url="ref/raise.html#l2h-373"/> +<entry name="range() (built-in function)" url="ref/for.html#l2h-416"/> +<entry name="raw input" url="ref/expression-input.html#l2h-445"/> +<entry name="raw string" url="ref/strings.html#l2h-16"/> +<entry name="raw_input() (built-in function)" url="ref/expression-input.html#l2h-445"/> +<entry name="readline() (file method)" url="ref/expression-input.html#l2h-442"/> +<entry name="rebinding, name" url="ref/execframes.html#l2h-242"/> +<entry name="recursive object" url="ref/string-conversions.html#l2h-279"/> +<entry name="reference, attribute" url="ref/attribute-references.html#l2h-282"/> +<entry name="reference, reference counting" url="ref/objects.html#l2h-28"/> +<entry name="reference, remove() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="reference, repr() (built-in function)" url="ref/customization.html#l2h-148"/> +<entry name="representation, integer" url="ref/types.html#l2h-76"/> +<entry name="reserved word" url="ref/keywords.html#l2h-12"/> +<entry name="restricted, execution" url="ref/execframes.html#l2h-248"/> +<entry name="return statement" url="ref/return.html#l2h-369"/> +<entry name="reverse, quotes" url="ref/customization.html#l2h-149"/> +<entry name="reverse() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="RuntimeError exception" url="ref/print.html#l2h-367"/> +<entry name="search, path, module" url="ref/import.html#l2h-386"/> +<entry name="sequence, item" url="ref/subscriptions.html#l2h-286"/> +<entry name="sequence object" url="ref/types.html#l2h-80"/> +<entry name="shifting, operation" url="ref/shifting.html#l2h-313"/> +<entry name="simple, statement" url="ref/simple.html#l2h-333"/> +<entry name="singleton, tuple" url="ref/types.html#l2h-91"/> +<entry name="slice" url="ref/slicings.html#l2h-288"/> +<entry name="slice() (built-in function)" url="ref/types.html#l2h-130"/> +<entry name="slice object" url="ref/sequence-types.html#l2h-178"/> +<entry name="slicing" url="ref/types.html#l2h-81"/> +<entry name="assignment" url="ref/assignment.html#l2h-353"/> +<entry name="extended" url="ref/slicings.html#l2h-292"/> +<entry name="sort() (sequence object method)" url="ref/sequence-types.html#l2h-168"/> +<entry name="space" url="ref/indentation.html#l2h-9"/> +<entry name="special, attribute" url="ref/types.html#l2h-69"/> +<entry name="special, attribute, generic" url="ref/types.html#l2h-69"/> +<entry name="stack, execution" url="ref/types.html#l2h-127"/> +<entry name="stack, trace" url="ref/types.html#l2h-127"/> +<entry name="standard, output" url="ref/exprstmts.html#l2h-337"/> +<entry name="Standard C" url="ref/strings.html#l2h-17"/> +<entry name="standard input" url="ref/programs.html#l2h-439"/> +<entry name="start (slice object attribute)" url="ref/types.html#l2h-67"/> +<entry name="statement, assert" url="ref/assert.html#l2h-338"/> +<entry name="statement, assignment" url="ref/types.html#l2h-92"/> +<entry name="statement, assignment, augmented" url="ref/augassign.html#l2h-354"/> +<entry name="statement, break" url="ref/break.html#l2h-375"/> +<entry name="statement, compound" url="ref/compound.html#l2h-402"/> +<entry name="statement, continue" url="ref/continue.html#l2h-380"/> +<entry name="statement, del" url="ref/types.html#l2h-92"/> +<entry name="statement, exec" url="ref/execframes.html#l2h-249"/> +<entry name="statement, expression" url="ref/exprstmts.html#l2h-334"/> +<entry name="statement, for" url="ref/break.html#l2h-376"/> +<entry name="statement, from" url="ref/execframes.html#l2h-249"/> +<entry name="statement, global" url="ref/execframes.html#l2h-246"/> +<entry name="statement, if" url="ref/if.html#l2h-407"/> +<entry name="statement, import" url="ref/types.html#l2h-109"/> +<entry name="statement (continued), loop" url="ref/break.html#l2h-376"/> +<entry name="statement (continued), pass" url="ref/pass.html#l2h-355"/> +<entry name="statement (continued), print" url="ref/customization.html#l2h-151"/> +<entry name="statement (continued), raise" url="ref/raise.html#l2h-372"/> +<entry name="statement (continued), return" url="ref/return.html#l2h-369"/> +<entry name="statement (continued), simple" url="ref/simple.html#l2h-333"/> +<entry name="statement (continued), try" url="ref/types.html#l2h-129"/> +<entry name="statement (continued), while" url="ref/break.html#l2h-376"/> +<entry name="statement grouping" url="ref/indentation.html#l2h-9"/> +<entry name="stderr (in module sys)" url="ref/types.html#l2h-55"/> +<entry name="stdin (in module sys)" url="ref/types.html#l2h-55"/> +<entry name="stdio" url="ref/types.html#l2h-122"/> +<entry name="stdout (in module sys)" url="ref/types.html#l2h-55"/> +<entry name="step (slice object attribute)" url="ref/types.html#l2h-67"/> +<entry name="stop (slice object attribute)" url="ref/types.html#l2h-67"/> +<entry name="str() (built-in function)" url="ref/customization.html#l2h-150"/> +<entry name="string, comparison" url="ref/types.html#l2h-86"/> +<entry name="string, conversion" url="ref/customization.html#l2h-149"/> +<entry name="string, item" url="ref/subscriptions.html#l2h-287"/> +<entry name="string literal" url="ref/strings.html#l2h-14"/> +<entry name="string object" url="ref/types.html#l2h-85"/> +<entry name="subscription" url="ref/types.html#l2h-80"/> +<entry name="assignment" url="ref/assignment.html#l2h-350"/> +<entry name="subtraction" url="ref/binary.html#l2h-312"/> +<entry name="suite" url="ref/compound.html#l2h-403"/> +<entry name="suppression, newline" url="ref/print.html#l2h-365"/> +<entry name="syntax" url="ref/notation.html#l2h-1"/> +<entry name="SyntaxError exception" url="ref/import.html#l2h-387"/> +<entry name="sys (built-in module)" url="ref/print.html#l2h-366"/> +<entry name="sys.exc_info" url="ref/types.html#l2h-128"/> +<entry name="sys.exc_traceback" url="ref/types.html#l2h-128"/> +<entry name="sys.last_traceback" url="ref/types.html#l2h-128"/> +<entry name="sys.modules" url="ref/import.html#l2h-386"/> +<entry name="sys.stderr" url="ref/types.html#l2h-121"/> +<entry name="sys.stdin" url="ref/types.html#l2h-119"/> +<entry name="sys.stdout" url="ref/types.html#l2h-120"/> +<entry name="tab" url="ref/indentation.html#l2h-9"/> +<entry name="target" url="ref/assignment.html#l2h-345"/> +<entry name="deletion" url="ref/del.html#l2h-358"/> +<entry name="list" url="ref/assignment.html#l2h-345"/> +<entry name="list assignment" url="ref/assignment.html#l2h-346"/> +<entry name="list, deletion" url="ref/del.html#l2h-358"/> +<entry name="loop control" url="ref/break.html#l2h-378"/> +<entry name="tb_frame (traceback attribute)" url="ref/types.html#l2h-65"/> +<entry name="tb_lasti (traceback attribute)" url="ref/types.html#l2h-65"/> +<entry name="tb_lineno (traceback attribute)" url="ref/types.html#l2h-65"/> +<entry name="tb_next (traceback attribute)" url="ref/types.html#l2h-65"/> +<entry name="termination model" url="ref/exceptions.html#l2h-256"/> +<entry name="test, identity" url="ref/comparisons.html#l2h-323"/> +<entry name="test, membership" url="ref/comparisons.html#l2h-322"/> +<entry name="token" url="ref/lexical.html#l2h-3"/> +<entry name="trace, stack" url="ref/types.html#l2h-127"/> +<entry name="trace, traceback object" url="ref/types.html#l2h-127"/> +<entry name="trailing, comma" url="ref/exprlists.html#l2h-331"/> +<entry name="triple-quoted string" url="ref/strings.html#l2h-16"/> +<entry name="try statement" url="ref/types.html#l2h-129"/> +<entry name="tuple, display" url="ref/parenthesized.html#l2h-270"/> +<entry name="tuple, empty" url="ref/types.html#l2h-91"/> +<entry name="tuple, singleton" url="ref/types.html#l2h-91"/> +<entry name="tuple object" url="ref/types.html#l2h-91"/> +<entry name="type" url="ref/types.html#l2h-68"/> +<entry name="data" url="ref/types.html#l2h-68"/> +<entry name="hierarchy" url="ref/types.html#l2h-68"/> +<entry name="immutable data" url="ref/atom-literals.html#l2h-267"/> +<entry name="type() (built-in function)" url="ref/objects.html#l2h-26"/> +<entry name="type of an object" url="ref/objects.html#l2h-27"/> +<entry name="TypeError exception" url="ref/unary.html#l2h-306"/> +<entry name="types, internal" url="ref/types.html#l2h-123"/> +<entry name="unary, arithmetic operation" url="ref/unary.html#l2h-302"/> +<entry name="unary, bit-wise operation" url="ref/unary.html#l2h-302"/> +<entry name="unbinding, name" url="ref/execframes.html#l2h-243"/> +<entry name="unichr() (built-in function)" url="ref/types.html#l2h-87"/> +<entry name="Unicode" url="ref/types.html#l2h-90"/> +<entry name="unicode() (built-in function)" url="ref/types.html#l2h-89"/> +<entry name="unicode object" url="ref/types.html#l2h-90"/> +<entry name="UNIX" url="ref/programs.html#l2h-439"/> +<entry name="unreachable object" url="ref/objects.html#l2h-28"/> +<entry name="unrecognized escape sequence" url="ref/strings.html#l2h-19"/> +<entry name="update() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="user-defined, function" url="ref/types.html#l2h-103"/> +<entry name="user-defined, function call" url="ref/calls.html#l2h-297"/> +<entry name="user-defined, method" url="ref/types.html#l2h-105"/> +<entry name="user-defined, module" url="ref/import.html#l2h-386"/> +<entry name="user-defined function object" url="ref/types.html#l2h-103"/> +<entry name="user-defined method object" url="ref/types.html#l2h-105"/> +<entry name="value, default parameter" url="ref/function.html#l2h-430"/> +<entry name="value of an object" url="ref/objects.html#l2h-27"/> +<entry name="ValueError exception" url="ref/shifting.html#l2h-314"/> +<entry name="values, writing" url="ref/exprstmts.html#l2h-337"/> +<entry name="values() (mapping object method)" url="ref/sequence-types.html#l2h-166"/> +<entry name="while statement" url="ref/break.html#l2h-376"/> +<entry name="whitespace" url="ref/indentation.html#l2h-9"/> +<entry name="writing, values" url="ref/exprstmts.html#l2h-337"/> +<entry name="xor, bit-wise" url="ref/bitwise.html#l2h-317"/> +<entry name="xor, ZeroDivisionError exception" url="ref/binary.html#l2h-309"/> +</index> +</kdeveloptoc> + diff --git a/languages/python/doc/python_bugs.toc b/languages/python/doc/python_bugs.toc new file mode 100644 index 00000000..0b2a5196 --- /dev/null +++ b/languages/python/doc/python_bugs.toc @@ -0,0 +1,7 @@ +<!DOCTYPE kdeveloptoc>
+<kdeveloptoc>
+<title>Python bugs</title>
+<base href="http://sourceforge.net/"/>
+<tocsect1 name="Query" url="tracker/?group_id=5470&atid=105470">
+</tocsect1>
+</kdeveloptoc>
diff --git a/languages/python/file_templates/Makefile.am b/languages/python/file_templates/Makefile.am new file mode 100644 index 00000000..0846fdf2 --- /dev/null +++ b/languages/python/file_templates/Makefile.am @@ -0,0 +1,4 @@ +templatedir = $(kde_datadir)/kdevfilecreate/file-templates +template_DATA = py + + diff --git a/languages/python/file_templates/py b/languages/python/file_templates/py new file mode 100644 index 00000000..64192c64 --- /dev/null +++ b/languages/python/file_templates/py @@ -0,0 +1,7 @@ +########################################################################### +# Copyright (C) $YEAR$ by $AUTHOR$ +# <$EMAIL$> +# +# Copyright: See COPYING file that comes with this distribution +# +########################################################################### diff --git a/languages/python/kde_pydoc.py b/languages/python/kde_pydoc.py new file mode 100755 index 00000000..0516f172 --- /dev/null +++ b/languages/python/kde_pydoc.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python +""" +""" + +__author__ = "David Nolden<david.kde@art-master.de>, Ka-Ping Yee <ping@lfw.org>" +__version__ = "6 April 2006" + +import sys, imp, os, stat, re, types, cgi +from repr import Repr +from string import expandtabs, find, join, lower, split, strip, rstrip +import pydoc + + + + +def cleanlinks(string): + """Changes the links to work with the pydoc:-notation""" + finalstring = "" + string = str(string).replace(".html","") + pos = 0 + mark = "<a href=\"" + l = len(mark) + while(pos != -1): + opos = pos + pos = string.find(mark, pos) + if(pos == -1): + finalstring += string[opos:] + break + finalstring += string[opos:pos+l] + pos+=l + if(string[pos] == '#' or string.find(":/",pos, pos+10) != -1): #leave local jumps or external references untouched + continue + finalstring += "pydoc:" + if(string[pos] == "." and string[pos+1] == "\""): + pos += 1 + finalstring += "modules" + + return finalstring + + +#This maximum depth was introduced because the program needs a very long time to +#complete the task in big file-system-trees(like my home), and can be invoked by a simple pydoc:. +#and cannot be stopped through the browser(just by killing python) +__maxdepth = 4 + +def writedocs(path, pkgpath='', depth=0, notprocessed=[]): + if(path == "/."): + writedoc(path) + return + depth+=1 + + if os.path.isdir(path): + if(depth > __maxdepth): + notprocessed.append(path) + return + dir = path + for file in os.listdir(dir): + path = os.path.join(dir, file) + if os.path.isdir(path): + writedocs(path, file + '.' + pkgpath, depth) + if os.path.isfile(path): + writedocs(path, pkgpath, depth) + if os.path.isfile(path): + modname = pydoc.inspect.getmodulename(path) + if modname: + writedoc(pkgpath + modname) + + if(depth == 1): + if(len(notprocessed) != 0): + print "<br> the following paths were not processed because they are deeper than the maximum depth of " + str(__maxdepth) + ":<br>" + for x in notprocessed: + print cgi.escape(x) + " <br>" + +def writedoc(key,top=False): + """Write HTML documentation to a file in the current directory.""" + if(type(key) == str and (key == "modules" or key == "/.")): + heading = pydoc.html.heading( + '<br><big><big><strong> ' + 'Python: Index of Modules' + '</strong></big></big>', + '#ffffff', '#7799ee') + builtins = [] + for name in sys.builtin_module_names: + builtins.append('<a href="%s">%s</a>' % (cgi.escape(name,quote=True), cgi.escape(name))) + indices = ['<p>Built-in modules: ' + cgi.escape(join(builtins, ', '))] + seen = {} + for dir in pydoc.pathdirs(): + indices.append(pydoc.html.index(dir, seen)) + print cleanlinks(heading + join(indices)) + return + + if(type(key) != types.ModuleType): + object = pydoc.locate(key) + if(object == None and top): + print "could not locate module/object for key " + \ + cgi.escape(key) + "<br><a href=\"pydoc:modules\">go to index</a>"; + else: + object = key + + if object: + print cleanlinks(pydoc.html.page(pydoc.describe(object), pydoc.html.document(object))) + + + +if __name__ == '__main__': + import getopt + class BadUsage: pass + + try: + opts, args = getopt.getopt(sys.argv[1:], 'k:p:w') + + print "<html>" + print "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" + print "</head><body>" + + if args: + for arg in args: + try: + if os.path.isdir(arg): writedocs(arg) + + if os.path.isfile(arg): + arg = pydoc.importfile(arg) + writedoc(arg, True) + except pydoc.ErrorDuringImport, value: + print 'problem in %s - %s' % ( + cgi.escape(value.filename), cgi.escape(value.exc)) + else: + raise BadUsage + + except (getopt.error, BadUsage): + print "need parameters\n" diff --git a/languages/python/kdevpythonsupport.desktop b/languages/python/kdevpythonsupport.desktop new file mode 100644 index 00000000..9f15e39f --- /dev/null +++ b/languages/python/kdevpythonsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Python Support +Comment[ca]=Suport per a Python +Comment[da]=Python-understøttelse +Comment[de]=Unterstützung für Python +Comment[el]=ΥποστήÏιξη Python +Comment[es]=Soporte para Python +Comment[et]=Pythoni toetus +Comment[eu]=Python euskarria +Comment[fa]=پشتیبانی پیتون +Comment[fr]=Prise en charge du langage PYTHON +Comment[ga]=TacaÃocht Python +Comment[gl]=Soporte para Python +Comment[hi]=पायथन समरà¥à¤¥à¤¨ +Comment[hu]=Python-támogatás +Comment[is]=Python stuðningur +Comment[it]=Supporto per Python +Comment[ja]=Python サãƒãƒ¼ãƒˆ +Comment[nds]=Ãœnnerstütten för Python +Comment[ne]=पाइथोन समरà¥à¤¥à¤¨ +Comment[nl]=Ondersteuning voor Python +Comment[pl]=ObsÅ‚uga Pythona +Comment[pt]=Suporte a Python +Comment[pt_BR]=Suporte ao Python +Comment[ru]=Поддержка Ñзыка Python +Comment[sk]=Python podpora +Comment[sl]=Podpora za Python +Comment[sr]=Подршка за Python +Comment[sr@Latn]=PodrÅ¡ka za Python +Comment[sv]=Python-stöd +Comment[ta]=பைதான௠ஆதரவ௠+Comment[tg]=ÐÑ€Ó£ намудани забони Python +Comment[tr]=Python DesteÄŸi +Comment[zh_CN]=Python æ”¯æŒ +Comment[zh_TW]=Python æ”¯æ´ +Name=KDevPythonSupport +Name[da]=KDevelop Python-understøttelse +Name[de]=Unterstützung für Python (KDevelop) +Name[hi]=के-डेव-पायथन-समरà¥à¤¥à¤¨ +Name[nds]=Python-Ãœnnerstütten för KDevelop +Name[pl]=KDevObsÅ‚ugaPythona +Name[sk]=KDev Python podpora +Name[sv]=KDevelop Python-stöd +Name[ta]=கெடெவ௠பைதான௠ஆதரவ௠+Name[tg]=ÐÑ€Ó£ намудани забони Python +Name[zh_TW]=KDevelop Python æ”¯æ´ +GenericName=Python Support +GenericName[ca]=Suport per a Python +GenericName[da]=Python-understøttelse +GenericName[de]=Unterstützung für Python +GenericName[el]=ΥποστήÏιξη Python +GenericName[es]=Soporte para Python +GenericName[et]=Pythoni toetus +GenericName[eu]=Python euskarria +GenericName[fa]=پشتیبانی پیتون +GenericName[fr]=Prise en charge du langage PYTHON +GenericName[ga]=TacaÃocht Python +GenericName[gl]=Soporte para Python +GenericName[hi]=पायथन समरà¥à¤¥à¤¨ +GenericName[hu]=Python-támogatás +GenericName[it]=Supporto per Python +GenericName[ja]=Python サãƒãƒ¼ãƒˆ +GenericName[nds]=Ãœnnerstütten för Python +GenericName[ne]=पाइथोन समरà¥à¤¥à¤¨ +GenericName[nl]=Ondersteuning voor Python +GenericName[pl]=ObsÅ‚uga Pythona +GenericName[pt]=Suporte a Python +GenericName[pt_BR]=Suporte ao Python +GenericName[ru]=Поддержка Ñзыка Python +GenericName[sk]=Python podpora +GenericName[sl]=Podpora za Python +GenericName[sr]=Подршка за Python +GenericName[sr@Latn]=PodrÅ¡ka za Python +GenericName[sv]=Python-stöd +GenericName[ta]=பைதான௠ஆதரவ௠+GenericName[tg]=ÐÑ€Ó£ намудани забони Python +GenericName[tr]=Python DesteÄŸi +GenericName[zh_CN]=Python æ”¯æŒ +GenericName[zh_TW]=Python æ”¯æ´ +ServiceTypes=KDevelop/LanguageSupport +X-KDE-Library=libkdevpythonsupport +X-KDevelop-Version=5 +X-KDevelop-Language=Python diff --git a/languages/python/kdevpythonsupport.rc b/languages/python/kdevpythonsupport.rc new file mode 100644 index 00000000..d19011b8 --- /dev/null +++ b/languages/python/kdevpythonsupport.rc @@ -0,0 +1,16 @@ +<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> +<kpartgui name="KDevPythonSupport" version="3"> +<MenuBar> + <Menu name="build" > + <Action name="build_exec" /> + <Action name="build_runinterpreter" /> + <Action name="build_execstring" /> + </Menu> + <Menu name="help"> + <Action name="help_pydoc"/> + </Menu> +</MenuBar> +<ToolBar name="buildToolBar"> + <Action name="build_exec" group="build_operations" /> +</ToolBar> +</kpartgui> diff --git a/languages/python/pydoc.cpp b/languages/python/pydoc.cpp new file mode 100644 index 00000000..79f184d7 --- /dev/null +++ b/languages/python/pydoc.cpp @@ -0,0 +1,113 @@ +#include "pydoc.h" + +#include <stdio.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <unistd.h> + +#include <qtextstream.h> +#include <kstandarddirs.h> +#include <kinstance.h> +#include <kprocess.h> +#include <kdeversion.h> +#include <kglobal.h> +#include <klocale.h> + +using namespace KIO; + + +PydocProtocol::PydocProtocol(const QCString &pool, const QCString &app) + : SlaveBase("pydoc", pool, app), key() +{ + python = KGlobal::dirs()->findExe("python"); + script = locate("data", "kio_pydoc/kde_pydoc.py"); +} + + +PydocProtocol::~PydocProtocol() +{} + + +void PydocProtocol::get(const KURL& url) +{ + mimeType("text/html"); + key = url.path(); + + QString cmd = KProcess::quote(python); + cmd += " "; + cmd += KProcess::quote(script); + cmd += " -w "; + cmd += KProcess::quote(key); + + FILE *fd = popen(cmd.local8Bit().data(), "r"); + char buffer[4096]; + QByteArray array; + + while (!feof(fd)) { + int n = fread(buffer, 1, 2048, fd); + if (n == -1) { + pclose(fd); + return; + } + array.setRawData(buffer, n); + data(array); + array.resetRawData(buffer, n); + } + + pclose(fd); + finished(); +} + + +void PydocProtocol::mimetype(const KURL&) +{ + mimeType( "text/html" ); + finished(); +} + + +QCString PydocProtocol::errorMessage() +{ + return QCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in pydoc").local8Bit() + "</body></html>" ); +} + + +void PydocProtocol::stat(const KURL &/*url*/) +{ + UDSAtom uds_atom; + uds_atom.m_uds = KIO::UDS_FILE_TYPE; + uds_atom.m_long = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO; + + UDSEntry uds_entry; + uds_entry.append(uds_atom); + + statEntry(uds_entry); + finished(); +} + + +void PydocProtocol::listDir(const KURL &url) +{ + error( KIO::ERR_CANNOT_ENTER_DIRECTORY, url.path() ); +} + + +extern "C" { + + int kdemain(int argc, char **argv) + { + KInstance instance( "kio_pydoc" ); + KGlobal::locale()->setMainCatalogue("kdevelop"); + + if (argc != 4) { + fprintf(stderr, "Usage: kio_pydoc protocol domain-socket1 domain-socket2\n"); + exit(-1); + } + + PydocProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + return 0; + } + +} diff --git a/languages/python/pydoc.h b/languages/python/pydoc.h new file mode 100644 index 00000000..e17a257a --- /dev/null +++ b/languages/python/pydoc.h @@ -0,0 +1,30 @@ +#ifndef _PYDOC_H_ +#define _PYDOC_H_ + +#include <qobject.h> +#include <kio/slavebase.h> + + +class PydocProtocol : public KIO::SlaveBase +{ +public: + PydocProtocol(const QCString &pool, const QCString &app); + virtual ~PydocProtocol(); + + virtual void get(const KURL& url); + virtual void stat(const KURL& url); + virtual void mimetype(const KURL& url); + virtual void listDir(const KURL& url); + +protected: + void decodeURL(const KURL &url); + void decodePath(QString path); + QCString errorMessage(); + +private: + QString python; + QString script; + QString key; +}; + +#endif diff --git a/languages/python/pydoc.protocol b/languages/python/pydoc.protocol new file mode 100644 index 00000000..4801357f --- /dev/null +++ b/languages/python/pydoc.protocol @@ -0,0 +1,9 @@ +[Protocol] +exec=kio_pydoc +protocol=pydoc +input=none +output=filesystem +reading=true +listing=Name +determineMimetypeFromExtension=false +Icon=help diff --git a/languages/python/pythonconfigwidget.cpp b/languages/python/pythonconfigwidget.cpp new file mode 100644 index 00000000..87472477 --- /dev/null +++ b/languages/python/pythonconfigwidget.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2002 by Bernd Gehrmann * + * bernd@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "pythonconfigwidget.h" + +#include <qcheckbox.h> +#include <klineedit.h> +#include "domutil.h" + + +PythonConfigWidget::PythonConfigWidget(QDomDocument &projectDom, + QWidget *parent, const char *name) + : PythonConfigWidgetBase(parent, name), dom(projectDom) +{ + interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevpythonsupport/run/interpreter")); + terminal_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevpythonsupport/run/terminal")); +} + + +PythonConfigWidget::~PythonConfigWidget() +{} + + +void PythonConfigWidget::accept() +{ + DomUtil::writeEntry(dom, "/kdevpythonsupport/run/interpreter", interpreter_edit->text()); + DomUtil::writeBoolEntry(dom, "/kdevpythonsupport/run/terminal", terminal_box->isChecked()); +} + +#include "pythonconfigwidget.moc" diff --git a/languages/python/pythonconfigwidget.h b/languages/python/pythonconfigwidget.h new file mode 100644 index 00000000..22708c29 --- /dev/null +++ b/languages/python/pythonconfigwidget.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2002 by Bernd Gehrmann * + * bernd@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _PYTHONCONFIGWIDGET_H_ +#define _PYTHONCONFIGWIDGET_H_ + +#include "pythonconfigwidgetbase.h" +#include <qdom.h> + + +class PythonConfigWidget : public PythonConfigWidgetBase +{ + Q_OBJECT + +public: + PythonConfigWidget( QDomDocument &projectDom, QWidget *parent=0, const char *name=0 ); + ~PythonConfigWidget(); + +public slots: + void accept(); + +private: + QDomDocument &dom; +}; + +#endif diff --git a/languages/python/pythonconfigwidgetbase.ui b/languages/python/pythonconfigwidgetbase.ui new file mode 100644 index 00000000..d3228822 --- /dev/null +++ b/languages/python/pythonconfigwidgetbase.ui @@ -0,0 +1,121 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>PythonConfigWidgetBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>python_config_widget</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>480</height> + </rect> + </property> + <property name="caption"> + <string>Python</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>interpreter_label</cstring> + </property> + <property name="text"> + <string>Python &interpreter:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>interpreter_edit</cstring> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>Layout1</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + + <widget class="KLineEdit"> + <property name="name"> + <cstring>interpreter_edit</cstring> + </property> + </widget> + <spacer> + <property name="name" stdset="0"> + <cstring>Spacer1</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <spacer> + <property name="name" stdset="0"> + <cstring>Spacer3</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Minimum</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox"> + <property name="name"> + <cstring>terminal_box</cstring> + </property> + <property name="text"> + <string>&Execute programs in a terminal</string> + </property> + </widget> + <spacer> + <property name="name" stdset="0"> + <cstring>Spacer2</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> +</widget> +<includes> + <include location="global" impldecl="in implementation">kdialog.h</include> +</includes> +<layoutdefaults spacing="6" margin="11"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<includehints> + <includehint>klineedit.h</includehint> +</includehints> +</UI> diff --git a/languages/python/pythonimplementationwidget.cpp b/languages/python/pythonimplementationwidget.cpp new file mode 100644 index 00000000..151fe9c3 --- /dev/null +++ b/languages/python/pythonimplementationwidget.cpp @@ -0,0 +1,77 @@ +/*************************************************************************** + * Copyright (C) 2005 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "pythonimplementationwidget.h" + +#include <qdir.h> +#include <qfile.h> +#include <qregexp.h> +#include <qfileinfo.h> +#include <qtextstream.h> + +#include <klineedit.h> +#include <klocale.h> +#include <kmessagebox.h> + +#include <filetemplate.h> +#include <kdevlanguagesupport.h> +#include <kdevproject.h> + +PythonImplementationWidget::PythonImplementationWidget(KDevLanguageSupport* part, + QWidget* parent, const char* name, bool modal) + : ImplementationWidget(part, parent, name, modal) +{ +} + + +PythonImplementationWidget::~PythonImplementationWidget() +{ +} + + +QStringList PythonImplementationWidget::createClassFiles() +{ +// QString template_py = "require '$BASEFILENAME$'\n\nclass $CLASSNAME$ < $BASECLASSNAME$\n\n def initialize(*k)\n super(*k)\n end\n\nend\n"; + QString template_py = "from qt import *\nfrom $BASEFILENAME$ import *\nclass $CLASSNAME$($BASECLASSNAME$):\n\n def __init__(self,parent,name):\n $BASECLASSNAME$.__init__(self,parent,name)\n \n\n\n"; + + QFileInfo formInfo(m_formName); + template_py.replace(QRegExp("\\$BASEFILENAME\\$"), formInfo.baseName()+".py"); + template_py.replace(QRegExp("\\$CLASSNAME\\$"), classNameEdit->text()); + template_py.replace(QRegExp("\\$BASECLASSNAME\\$"), m_baseClassName); + + template_py = FileTemplate::read(m_part, "py") + template_py; + + QString file_py = fileNameEdit->text() + ".py"; + if (!m_part->project()->activeDirectory().isEmpty()) + file_py = m_part->project()->activeDirectory() + "/" + file_py; + QFile file(QDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + file_py)); + if (!file.open(IO_WriteOnly)) { + KMessageBox::error(0, i18n("Cannot write to file")); + return QStringList(); + } + QTextStream stream(&file); + stream << template_py; + file.close(); + + QStringList files; + files.append(file_py); + return files; +} + +#include "pythonimplementationwidget.moc" diff --git a/languages/python/pythonimplementationwidget.h b/languages/python/pythonimplementationwidget.h new file mode 100644 index 00000000..abae4a4c --- /dev/null +++ b/languages/python/pythonimplementationwidget.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * Copyright (C) 2005 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef PYTHONIMPLEMENTATIONWIDGET_H +#define PYTHONIMPLEMENTATIONWIDGET_H + +#include <implementationwidget.h> + +class PythonImplementationWidget : public ImplementationWidget +{ +Q_OBJECT +public: + PythonImplementationWidget(KDevLanguageSupport* part, QWidget* parent = 0, const char* name = 0, bool modal = true); + + ~PythonImplementationWidget(); + + virtual QStringList createClassFiles(); + +}; + +#endif diff --git a/languages/python/pythonsupportpart.cpp b/languages/python/pythonsupportpart.cpp new file mode 100644 index 00000000..1b0e76da --- /dev/null +++ b/languages/python/pythonsupportpart.cpp @@ -0,0 +1,410 @@ +/*************************************************************************** + * Copyright (C) 2001-2002 by Bernd Gehrmann * + * bernd@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "pythonsupportpart.h" +#include "pythonconfigwidget.h" + +#include <kdevcore.h> +#include <kdevproject.h> +#include <kdevappfrontend.h> +#include <kdevpartcontroller.h> +#include <codemodel.h> +#include <domutil.h> + +#include <qfileinfo.h> +#include <qpopupmenu.h> +#include <qstringlist.h> +#include <qtextstream.h> +#include <qtimer.h> +#include <qvbox.h> +#include <kaction.h> +#include <kapplication.h> +#include <kdebug.h> +#include <kdialogbase.h> +#include <kdevgenericfactory.h> +#include <kdevplugininfo.h> +#include <kinputdialog.h> +#include <klocale.h> +#include <qregexp.h> + +#include "qtdesignerpythonintegration.h" +#include "pythonimplementationwidget.h" + +typedef KDevGenericFactory<PythonSupportPart> PythonSupportFactory; +static const KDevPluginInfo data("kdevpythonsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevpythonsupport, PythonSupportFactory( data ) ) + +PythonSupportPart::PythonSupportPart(QObject *parent, const char *name, const QStringList &) + : KDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart") +{ + setInstance(PythonSupportFactory::instance()); + + setXMLFile("kdevpythonsupport.rc"); + + connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) ); + connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) ); + connect( partController(), SIGNAL(savedFile(const KURL&)), + this, SLOT(savedFile(const KURL&)) ); + connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), + this, SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), + this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); + + KAction *action; + + action = new KAction( i18n("Execute Program"), "exec", 0, + this, SLOT(slotExecute()), + actionCollection(), "build_exec" ); + action->setToolTip( i18n("Execute program") ); + action->setWhatsThis(i18n("<b>Execute program</b><p>Runs the Python program.")); + + action = new KAction( i18n("Execute String..."), "exec", 0, + this, SLOT(slotExecuteString()), + actionCollection(), "build_execstring" ); + action->setToolTip( i18n("Execute string") ); + action->setWhatsThis(i18n("<b>Execute String</b><p>Executes a string as Python code.")); + + action = new KAction( i18n("Start Python Interpreter"), "exec", 0, + this, SLOT(slotStartInterpreter()), + actionCollection(), "build_runinterpreter" ); + action->setToolTip( i18n("Start Python interpreter") ); + action->setWhatsThis(i18n("<b>Start python interpreter</b><p>Starts the Python interpreter without a program")); + + action = new KAction( i18n("Python Documentation..."), 0, + this, SLOT(slotPydoc()), + actionCollection(), "help_pydoc" ); + action->setToolTip( i18n("Python documentation") ); + action->setWhatsThis(i18n("<b>Python documentation</b><p>Shows a Python documentation page.")); +} + + +PythonSupportPart::~PythonSupportPart() +{} + + +void PythonSupportPart::contextMenu(QPopupMenu *popup, const Context *context) +{ + if (context->hasType(Context::FileContext)){ + const FileContext *fc = static_cast<const FileContext*>(context); + //this is a .ui file and only selection contains only one such file + KURL url = fc->urls().first(); + if (url.fileName().endsWith(".ui")) + { + m_contextFileName = url.fileName(); + int id = popup->insertItem(i18n("Create or Select Implementation..."), this, SLOT(slotCreateSubclass())); + popup->setWhatsThis(id, i18n("<b>Create or select implementation</b><p>Creates or selects a subclass of selected form for use with integrated KDevDesigner.")); + } + } +} + + +void PythonSupportPart::projectConfigWidget(KDialogBase *dlg) +{ + QVBox *vbox = dlg->addVBoxPage(i18n("Python")); + PythonConfigWidget *w = new PythonConfigWidget(*projectDom(), vbox, "python config widget"); + connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); +} + + +void PythonSupportPart::projectOpened() +{ + kdDebug(9014) << "projectOpened()" << endl; + + connect( project(), SIGNAL(addedFilesToProject(const QStringList &)), + this, SLOT(addedFilesToProject(const QStringList &)) ); + connect( project(), SIGNAL(removedFilesFromProject(const QStringList &)), + this, SLOT(removedFilesFromProject(const QStringList &)) ); + + // We want to parse only after all components have been + // properly initialized + QTimer::singleShot(0, this, SLOT(initialParse())); +} + + +void PythonSupportPart::projectClosed() +{ +} + + +void PythonSupportPart::maybeParse(const QString fileName) +{ + QFileInfo fi(fileName); + if (fi.extension() == "py") { + + if( codeModel()->hasFile(fileName) ){ + emit aboutToRemoveSourceInfo( fileName ); + codeModel()->removeFile( codeModel()->fileByName(fileName) ); + } + + parse( fileName ); + } +} + + +void PythonSupportPart::initialParse() +{ + kdDebug(9014) << "initialParse()" << endl; + + if (project()) { + kapp->setOverrideCursor(waitCursor); + QStringList files = project()->allFiles(); + for (QStringList::Iterator it = files.begin(); it != files.end() ;++it) { + kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl; + maybeParse(project()->projectDirectory() + "/" + *it); + } + + emit updatedSourceInfo(); + kapp->restoreOverrideCursor(); + } else { + kdDebug(9014) << "No project" << endl; + } +} + + +void PythonSupportPart::addedFilesToProject(const QStringList &fileList) +{ + kdDebug(9014) << "addedFilesToProject()" << endl; + + QStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + QString fileName = project()->projectDirectory() + "/" + ( *it ); + maybeParse( fileName ); + emit addedSourceInfo( fileName ); + } + + //emit updatedSourceInfo(); +} + + +void PythonSupportPart::removedFilesFromProject(const QStringList &fileList) +{ + kdDebug(9014) << "removedFilesFromProject()" << endl; + + QStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + QString fileName = project()->projectDirectory() + "/" + ( *it ); + + if( codeModel()->hasFile(fileName) ){ + emit aboutToRemoveSourceInfo( fileName ); + codeModel()->removeFile( codeModel()->fileByName(fileName) ); + } + } + + //emit updatedSourceInfo(); +} + + +void PythonSupportPart::savedFile(const KURL &fileName) +{ + kdDebug(9014) << "savedFile()" << endl; + + if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) { + maybeParse(fileName.path()); + emit addedSourceInfo( fileName.path() ); + } +} + + +KDevLanguageSupport::Features PythonSupportPart::features() +{ + return Features(Classes | Functions); +} + + +KMimeType::List PythonSupportPart::mimeTypes( ) +{ + KMimeType::List list; + KMimeType::Ptr mime = KMimeType::mimeType( "text/x-python" ); + if( mime ) + list << mime; + + mime = KMimeType::mimeType( "application/x-python" ); + if( mime ) + list << mime; + + return list; +} + +void PythonSupportPart::parse(const QString &fileName) +{ + QFile f(QFile::encodeName(fileName)); + if (!f.open(IO_ReadOnly)) + return; + QTextStream stream(&f); + + QRegExp classre("^[ \t]*class[ \t]+([A-Za-z0-9_]+)[ \t]*(\\(([A-Za-z0-9_, \t]+)\\))?.*$"); + QRegExp methodre("^[ \t]*def[ \t]+([A-Za-z0-9_]+).*$"); + + FileDom m_file = codeModel()->create<FileModel>(); + m_file->setName( fileName ); + + ClassDom lastClass; + QString rawline; + QCString line; + int lineNo = 0; + while (!stream.atEnd()) { + rawline = stream.readLine(); + line = rawline.stripWhiteSpace().local8Bit(); + if (classre.search(line) != -1) { + + lastClass = codeModel()->create<ClassModel>(); + lastClass->setName(classre.cap(1)); + lastClass->setFileName( fileName ); + lastClass->setStartPosition( lineNo, 0 ); + + QStringList parentList = QStringList::split(",", classre.cap(3)); + QStringList::ConstIterator it; + for (it = parentList.begin(); it != parentList.end(); ++it) { + QString baseName = (*it).stripWhiteSpace(); + kdDebug(9014) << "Add parent" << baseName << endl; + lastClass->addBaseClass( baseName ); + } + + if (m_file->hasClass(lastClass->name())) { + ClassDom old = m_file->classByName( lastClass->name() )[ 0 ]; + old->setFileName( lastClass->fileName() ); + + int line, col; + lastClass->getStartPosition( &line, &col ); + old->setStartPosition( line, col ); + + lastClass = old; + } else { + kdDebug(9014) << "Add class " << lastClass->name() << endl; + m_file->addClass( lastClass ); + } + + } else if (methodre.search(line) != -1 ) { + + FunctionDom method = codeModel()->create<FunctionModel>(); + method->setName(methodre.cap(1)); + method->setFileName( fileName ); + method->setStartPosition( lineNo, 0 ); + + if (lastClass && rawline.left(3) != "def") { + if( !lastClass->hasFunction(method->name()) ) + lastClass->addFunction( method ); + QStringList scope; + scope << lastClass->name(); + method->setScope( scope ); + + } else if( !m_file->hasFunction(method->name()) ){ + m_file->addFunction( method ); + lastClass = 0; + } + } + ++lineNo; + } + + f.close(); + + codeModel()->addFile( m_file ); +} + + +QString PythonSupportPart::interpreter() +{ + QString prog = DomUtil::readEntry(*projectDom(), "/kdevpythonsupport/run/interpreter"); + if (prog.isEmpty()) + prog = "python"; + + return prog; +} + + +void PythonSupportPart::startApplication(const QString &program) +{ + bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevpythonsupport/run/terminal"); + if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend")) + appFrontend->startAppCommand(QString::QString(), program, inTerminal); +} + + +void PythonSupportPart::slotExecute() +{ + QString program = project()->mainProgram(); + QString cmd = interpreter() + " " + program; + startApplication(cmd); +} + + +void PythonSupportPart::slotStartInterpreter() +{ + startApplication(interpreter()); +} + + +void PythonSupportPart::slotExecuteString() +{ + bool ok; + QString cmd = KInputDialog::getText(i18n("String to Execute"), i18n("String to execute:"), QString::null, &ok, 0); + if (ok) { + cmd.prepend("'"); + cmd.append("'"); + startApplication(cmd); + } +} + + +void PythonSupportPart::slotPydoc() +{ + bool ok; + QString key = KInputDialog::getText(i18n("Show Python Documentation"), i18n("Show Python documentation on keyword:"), "", &ok, 0); + if (ok && !key.isEmpty()) { + QString url = "pydoc:"; + url += key; + partController()->showDocument(KURL(url)); + } +} + +KDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::DesignerType type) +{ + KDevDesignerIntegration *des = 0; + switch (type) + { + case KInterfaceDesigner::QtDesigner: + des = m_designers[type]; + if (des == 0) + { + PythonImplementationWidget *impl = new PythonImplementationWidget(this); + des = new QtDesignerPythonIntegration(this, impl); + des->loadSettings(*project()->projectDom(), + "kdevpythonsupport/designerintegration"); + m_designers[type] = des; + } + break; + case KInterfaceDesigner::Glade: + break; + } + return des; + +} + +void PythonSupportPart::slotCreateSubclass() +{ + QFileInfo fi(m_contextFileName); + kdDebug(9014) << k_funcinfo << " file: " << m_contextFileName << " ext: " << fi.extension(false) << endl; + if (fi.extension(false) != "ui") + return; + QtDesignerPythonIntegration *des = dynamic_cast<QtDesignerPythonIntegration*>(designer(KInterfaceDesigner::QtDesigner)); + if (des) + { + kdDebug(9014) << "ok: " << des << endl; + kdDebug(9014) << "have impl: " << des->selectImplementation(m_contextFileName); + } + kdDebug(9014) << "end: " << des << endl; +} + +#include "pythonsupportpart.moc" diff --git a/languages/python/pythonsupportpart.h b/languages/python/pythonsupportpart.h new file mode 100644 index 00000000..ad2085e5 --- /dev/null +++ b/languages/python/pythonsupportpart.h @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2001-2002 by Bernd Gehrmann * + * bernd@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _PYTHONSUPPORTPART_H_ +#define _PYTHONSUPPORTPART_H_ + + +#include "kdevlanguagesupport.h" + +class KDialogBase; +class QStringList; +class QPopupMenu; +class Context; + +class PythonSupportPart : public KDevLanguageSupport +{ + Q_OBJECT + +public: + PythonSupportPart( QObject *parent, const char *name, const QStringList & ); + ~PythonSupportPart(); + + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + +public slots: + void contextMenu(QPopupMenu *popup, const Context *context); + void slotCreateSubclass(); + +protected: + virtual Features features(); + virtual KMimeType::List mimeTypes(); + +private slots: + void projectConfigWidget(KDialogBase *dlg); + void projectOpened(); + void projectClosed(); + void savedFile(const KURL &fileName); + void addedFilesToProject(const QStringList &fileList); + void removedFilesFromProject(const QStringList &fileList); + void slotExecute(); + void slotExecuteString(); + void slotStartInterpreter(); + + // Internal + void initialParse(); + void slotPydoc(); + +private: + QString interpreter(); + void startApplication(const QString &program); + void maybeParse(const QString fileName); + void parse(const QString &fileName); + + QMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> m_designers; + QString m_contextFileName; +}; + +#endif diff --git a/languages/python/qtdesignerpythonintegration.cpp b/languages/python/qtdesignerpythonintegration.cpp new file mode 100644 index 00000000..5a47d810 --- /dev/null +++ b/languages/python/qtdesignerpythonintegration.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + * Copyright (C) 2005 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "qtdesignerpythonintegration.h" + +#include <qpair.h> +#include <qregexp.h> + +#include <klocale.h> +#include <kdebug.h> +#include <kmessagebox.h> +#include <kurl.h> +#include <ktexteditor/editinterface.h> +#include <ktexteditor/view.h> +#include <ktexteditor/viewcursorinterface.h> + +#include <domutil.h> +#include <kdevpartcontroller.h> +#include <kdevcreatefile.h> +#include <kdevlanguagesupport.h> + +#include "codemodel_utils.h" +#include "implementationwidget.h" + +QtDesignerPythonIntegration::QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl) + :QtDesignerIntegration(part, impl, false, 0) +{ +} + + +QtDesignerPythonIntegration::~QtDesignerPythonIntegration() +{ +} + + +void QtDesignerPythonIntegration::addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass) +{ + m_part->partController()->editDocument( KURL( klass->fileName() ) ); + KTextEditor::EditInterface* editIface = dynamic_cast<KTextEditor::EditInterface*>( m_part->partController()->activePart() ); + if( !editIface ){ + /// @todo show messagebox +// QDialog::accept(); + return; + } + + kdDebug(9014) << "===============" << endl; + + int line, column; + klass->getStartPosition( &line, &column ); + + // compute the insertion point + QPair<int,int> point; + point.first = line + 1; + point.second = column; + + const FunctionList functionList = klass->functionList(); + if (functionList.count() > 0) + { + int funEndLine, funEndColumn; + functionList.first()->getEndPosition(&funEndLine, &funEndColumn); + point.second = funEndColumn; + } + + QString func = function.function; + func.replace("()", ""); + QString str = " def " + func + "(self):\n\n"; + + kdDebug(9014) << "insert " << str << " into " << point.first << endl; + + editIface->insertText(point.first, 0 /*pt.second*/, str ); + + KTextEditor::View *activeView = dynamic_cast<KTextEditor::View*>( m_part->partController()->activePart()->widget() ); + if (activeView) + { + KTextEditor::ViewCursorInterface* cursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(activeView ); + if (cursor) + cursor->setCursorPositionReal(point.first, 4); + } +} + +#include "qtdesignerpythonintegration.moc" diff --git a/languages/python/qtdesignerpythonintegration.h b/languages/python/qtdesignerpythonintegration.h new file mode 100644 index 00000000..8ac5d5be --- /dev/null +++ b/languages/python/qtdesignerpythonintegration.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * Copyright (C) 2005 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef QTDESIGNERPYTHONINTEGRATION_H +#define QTDESIGNERPYTHONINTEGRATION_H + +#include <qtdesignerintegration.h> + +class QtDesignerPythonIntegration : public QtDesignerIntegration +{ +Q_OBJECT +public: + QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl); + + ~QtDesignerPythonIntegration(); + + virtual void addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass); + +}; + +#endif |