pycode / README

PyCode - a library to create a decent Python IDE

Expected features

 * autocomplete, of course
   * autocomplete restructured text syntax inside documentation strings (:param foo..)
 * find definítion
 * find usage/show occurences
 * show signature/doc
 * show type/kind of given symbol
 * refactoring
   * rename
   * move
   * extract variable/constant
 * checks
   * valid syntax
   * pylint
   * pyflakes
   * pep8
   * regex syntax inside strings
   * tabnanny
 * fixing
   * NameErrors:
     * offer to add import-statement if name is found in module database
     * offer to add function if name is called (method if dotted-name)
     * offer to add variable if name is not called (attribute if dotted-name)
   * formatting
     * autopep8
   * Python 2/3 syntax differences: 2to3
   * tabs to spaces
   * spelling corrections
 * goto symbol
   * inputting any class name opens the file containing the class
 * outline/tree/structure of module
 * indention hints/autoindent
 * tasks (XXX/TODO in source)
 * auto-editing
   * close parentheses/brackets/braces
   * space after comma
   * after "from FOO " append "import "
   * add documentation stub based on signature
 * correctly load/save source files according to encoding hint at the header
 * project settings
   * source root folder
   * addition python path
   * virtualenv support
 * online help for api/library
 * debugging facility

Comparison of free available Python solutions

rope (
 * refactoring library with codeassist module
 * type inference for Python code
 * tries to fix syntax errors if ast cannot be generated
 * dynamic object information for extension modules
   (has to be enabled)
 * last update: 2012

jedi (
 * fault-tolerant autocompletion library which can ignore syntax errors
 * uses tokenize for "fuzzy-parsing" instead of abstract syntax tree
 * last update: 2013

Ninja-IDE (
 * autocompletion built into Ninja-IDE, created because Rope was too slow
   (resides in ninja_ide/tools/completion)
 * last update: 2013

Supplement (
 * claims to be faster than rope
 * multi-process and virtualenv support
 * last update: 2012

Pysmell (
 * last update: 2010

 * code-intelligence library
 * type inference and xml api files
 * has some extension module depedencies
 * fork at
vim-python-ftplugin (
 * type inference based on ast
 * last update: 2011

Pyntch (
 * contains some stub modules for extensions
 * last update: 2010

KDevelop-Python-Plugin (
 * C++ based on KDevelop-DU-chain-Framework
 * incremental type inference
 * stubs for some extension-modules (e.g. PyQt)
 * last update: 2012

Python Tools for Visual Studio (
 * Python parser and ast inference engine
 * implemented in C# but looks clean and complete 
   (might be useful for reference?)
 * last update: 2012

Other programs which contain type inference
* pylint
* Mypy
* PyPy
* ShedSkin
* PyDev-Plugin for Eclipse (implemented in Java)
* non-free: PyCharm, WingIDE

Related Papers
 * John Aycock: Aggressive Type Inference
 * Starkiller: A Static Type Inferencer and Compiler for Python 

Additional links

This library heavily depends on the hard work of other authors, mainly of Rope and Jedi

 * function module_completions is taken from Spyder
 * copies of rope, jedi, pep8, autopep8, pylint, pyflakes and whoosh are included for convenience
 * indenter is based  on code from rope-ide
 * stubs for extension modules were collected from various sources. They only contain the signature of stdlib functions.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.