Skip to main content

Python/Qt Code Editor widget

Project description

Travis-CI build status Number of PyPI downloads Latest PyPI version 'Stories in Ready'

What is pyQode?

pyQode is a flexible source code editor widget for Python Qt applications. pyQode is a library/widget, not an IDE. You can see it as an alternative to QScintilla.

pyQode is a namespace package made up of the following official packages:

pyqode.core is the foundation package, it contains the pyqode base classes (QCodeEdit, Mode, Panel) and a set of builtin modes and panels that are useful for any kind of code editor. With pyqode.core you can already create a generic code editor (similar to gedit, notepad++) with only a few lines of code.

Features

Here are the core features:

  • supports PySide and/or PyQt4

  • supports Python 2 and/or Python 3

  • simple widget based on QPlainTextEdit

  • easily customisable (modes and panels)

  • native look and feel close to Qt creator

  • builtin modes and panels (folding, line number, code completion, syntax highlighting)

  • Qt Designer plugin

License

pyQode is licensed under the MIT license.

Requirements

pyqode.core depends on the following libraries:

  • Python 2.7 or Python 3 (>= 3.2)

  • PyQt4 or PySide

  • pygments

Installation

You need to install PyQt4 or PySide by yourself.

Then you can install pyqode using pip:

$ pip install pyqode.core

Usage

The public API is exposed by the pyqode.core package.

Here is a simple example using PyQt4:

# simple example using PyQt4
import sys
import PyQt4  # just to tell pyqode we want to use PyQt4.
import pyqode.core
from PyQt4.QtGui import QApplication


def main():
    app = QApplication(sys.argv)
    editor = pyqode.core.QGenericCodeEdit()
    editor.openFile(__file__)
    editor.resize(800, 600)
    editor.show()
    return app.exec_()


if __name__ == "__main__":
    sys.exit(main())

Resources

Screenshots

Here are a few screenshots of the gui integration example on several different platforms:

  • Windows 7:

Windows 7
  • Ubuntu:

Ubuntu
  • Linux Mint:

Linux mint
  • KDE:

KDE
  • KDE with a dark color scheme:

KDE dark
  • Gnome:

Gnome

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqode.core-1.3.1.tar.gz (474.7 kB view hashes)

Uploaded Source

Built Distributions

pyqode.core-1.3.1-py3.3.egg (327.6 kB view hashes)

Uploaded Source

pyqode.core-1.3.1-py2.7.egg (319.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page