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 (https://bitbucket.org/agr/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 (http://github.com/davidhalter/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 (http://github.com/ninja-ide/ninja-ide)
 * autocompletion built into Ninja-IDE, created because Rope was too slow
   (resides in ninja_ide/tools/completion)
 * last update: 2013

Supplement (http://github.com/baverman/supplement)
 * claims to be faster than rope
 * multi-process and virtualenv support
 * last update: 2012

Pysmell (http://code.google.com/p/pysmell/)
 * last update: 2010

Komodo-IDE
 * code-intelligence library
 * type inference and xml api files
 * has some extension module depedencies
 * fork at https://github.com/Kronuz/SublimeCodeIntel
 
vim-python-ftplugin (http://github.com/tarmack/vim-python-ftplugin)
 * type inference based on ast
 * last update: 2011

Pyntch (http://www.unixuser.org/~euske/python/pyntch/index.html)
 * contains some stub modules for extensions
 * last update: 2010

KDevelop-Python-Plugin (http://scummos.blogspot.de/search/label/kdev-python)
 * 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 (http://pytools.codeplex.com/)
 * 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
   http://www.python.org/workshops/2000-01/proceedings/papers/aycock/aycock.html
 * Starkiller: A Static Type Inferencer and Compiler for Python 
 

Additional links
 * http://www.smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/
 * http://lambda-the-ultimate.org/node/1519
 * https://sites.google.com/site/jburnim/python-type-inference 






Copyright
---------
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 ProjectModifiedEvent.java.
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.