File: python.el.html

Major mode for editing Python files with some fontification and indentation bits extracted from original Dave Love's python.el found in GNU Emacs.

Implements Syntax highlighting, Indentation, Movement, Shell interaction, Shell completion, Shell virtualenv support, Shell package support, Shell syntax highlighting, Pdb tracking, Symbol completion, Skeletons, FFAP, Code Check, ElDoc, Imenu, Flymake, Import management.

Syntax highlighting: Fontification of code is provided and supports python's triple quoted strings properly.

Indentation: Automatic indentation with indentation cycling is provided, it allows you to navigate different available levels of indentation by hitting <tab> several times. Also electric-indent-mode is supported such that when inserting a colon the current line is dedented automatically if needed.

Movement: beginning-of-defun and end-of-defun functions are properly implemented. There are also specialized forward-sentence and backward-sentence replacements called python-nav-forward-block, python-nav-backward-block respectively which navigate between beginning of blocks of code. Extra functions python-nav-forward-statement, python-nav-backward-statement, python-nav-beginning-of-statement, python-nav-end-of-statement, python-nav-beginning-of-block, python-nav-end-of-block and python-nav-if-name-main are included but no bound to any key.

Shell interaction: is provided and allows opening Python shells inside Emacs and executing any block of code of your current buffer in that inferior Python process.

Besides that only the standard CPython (2.x and 3.x) shell and IPython are officially supported out of the box, the interaction should support any other readline based Python shells as well
(e.g. Jython and PyPy have been reported to work). You can change
your default interpreter and commandline arguments by setting the python-shell-interpreter and python-shell-interpreter-args variables. This example enables IPython globally:

(setq python-shell-interpreter "ipython"
      python-shell-interpreter-args "--simple-prompt")

Using the "console" subcommand to start IPython in server-client mode is known to fail intermittently due a bug on IPython itself
(see URL https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18052#27).
There seems to be a race condition in the IPython server (A.K.A kernel) when code is sent while it is still initializing, sometimes causing the shell to get stalled. With that said, if an IPython kernel is already running, "console --existing" seems to work fine.

Running IPython on Windows needs more tweaking. The way you should set python-shell-interpreter and python-shell-interpreter-args is as follows (of course you need to modify the paths according to your system):

(setq python-shell-interpreter "C:/Python27/python.exe"
      python-shell-interpreter-args
      "-i C:/Python27/Scripts/ipython-script.py")

Missing or delayed output used to happen due to differences between Operating Systems' pipe buffering (e.g. CPython 3.3.4 in Windows 7. See URL https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17304). To avoid this, the python-shell-unbuffered defaults to non-nil and controls whether python-shell--calculate-process-environment should set the "PYTHONUNBUFFERED" environment variable on startup: See URL https://docs.python.org/3/using/cmdline.html#cmdoption-u.

The interaction relies upon having prompts for input (e.g. ">>> " and "... " in standard Python shell) and output (e.g. "Out[1]: " in IPython) detected properly. Failing that Emacs may hang but, in the case that happens, you can recover with \C-g (keyboard-quit). To avoid this issue, a two-step prompt autodetection mechanism is provided: the first step is manual and consists of a collection of regular expressions matching common prompts for Python shells stored in python-shell-prompt-input-regexps and python-shell-prompt-output-regexps, and dir-local friendly vars python-shell-prompt-regexp, python-shell-prompt-block-regexp, python-shell-prompt-output-regexp which are appended to the former automatically when a shell spawns; the second step is automatic and depends on the python-shell-prompt-detect helper function. See its docstring for details on global variables that modify its behavior.

Shell completion: hitting tab will try to complete the current word. The two built-in mechanisms depend on Python's readline module: the "native" completion is tried first and is activated when python-shell-completion-native-enable is non-nil, the current python-shell-interpreter is not a member of the python-shell-completion-native-disabled-interpreters variable and python-shell-completion-native-setup succeeds; the "fallback" or
"legacy" mechanism works by executing Python code in the background
and enables auto-completion for shells that do not support receiving escape sequences (with some limitations, i.e. completion in blocks does not work). The code executed for the "fallback" completion can be found in python-shell-completion-setup-code and python-shell-completion-get-completions. Their default values enable completion for both CPython and IPython, and probably any readline based shell (it's known to work with PyPy). If your Python installation lacks readline (like CPython for Windows), installing pyreadline (URL https://ipython.org/pyreadline.html) should suffice. To troubleshoot why you are not getting any completions, you can try the following in your Python shell:

>>> import readline, rlcompleter

If you see an error, then you need to either install pyreadline or setup custom code that avoids that dependency.

By default, the "native" completion uses the built-in rlcompleter. To use other readline completer (e.g. Jedi) or a custom one, you just need to set it in the PYTHONSTARTUP file. You can set an Emacs-specific completer by testing the environment variable INSIDE_EMACS.

Shell virtualenv support: The shell also contains support for virtualenvs and other special environment modifications thanks to python-shell-process-environment and python-shell-exec-path. These two variables allows you to modify execution paths and environment variables to make easy for you to setup virtualenv rules or behavior modifications when running shells. Here is an example of how to make shell processes to be run using the /path/to/env/ virtualenv:

(setq python-shell-process-environment
      (list
       (format "PATH=%s" (mapconcat
                          #'identity
                          (reverse
                           (cons (getenv "PATH")
                                 '("/path/to/env/bin/")))
                          ":"))
       "VIRTUAL_ENV=/path/to/env/"))
(python-shell-exec-path . ("/path/to/env/bin/"))

Since the above is cumbersome and can be programmatically calculated, the variable python-shell-virtualenv-root is provided. When this variable is set with the path of the virtualenv to use, process-environment and exec-path(var)/exec-path(fun) get proper values in order to run shells inside the specified virtualenv. So the following will achieve the same as the previous example:

(setq python-shell-virtualenv-root "/path/to/env/")

Also the python-shell-extra-pythonpaths variable have been introduced as simple way of adding paths to the PYTHONPATH without affecting existing values.

Shell package support: you can enable a package in the current shell so that relative imports work properly using the python-shell-package-enable command.

Shell remote support: remote Python shells are started with the correct environment for files opened remotely through tramp, also respecting dir-local variables provided enable-remote-dir-locals is non-nil. The logic for this is transparently handled by the python-shell-with-environment macro.

Shell syntax highlighting: when enabled current input in shell is highlighted. The variable python-shell-font-lock-enable controls activation of this feature globally when shells are started. Activation/deactivation can be also controlled on the fly via the python-shell-font-lock-toggle command.

Pdb tracking: when you execute a block of code that contains some call to pdb (or ipdb) it will prompt the block of code and will follow the execution of pdb marking the current line with an arrow.

Symbol completion: you can complete the symbol at point. It uses the shell completion in background so you should run python-shell-send-buffer from time to time to get better results.

Skeletons: skeletons are provided for simple inserting of things like class, def, for, import, if, try, and while. These skeletons are integrated with abbrev. If you have abbrev-mode(var)/abbrev-mode(fun) activated and python-skeleton-autoinsert is set to t, then whenever you type the name of any of those defined and hit SPC, they will be automatically expanded. As an alternative you can use the defined skeleton commands: python-skeleton-<foo>.

FFAP: You can find the filename for a given module when using ffap out of the box. This feature needs an inferior python shell running.

Code check: Check the current file for errors with python-check using the program defined in python-check-command.

ElDoc: returns documentation for object at point by using the inferior python subprocess to inspect its documentation. As you might guessed you should run python-shell-send-buffer from time to time to get better results too.

Imenu: There are two index building functions to be used as imenu-create-index-function: python-imenu-create-index (the default one, builds the alist in form of a tree) and python-imenu-create-flat-index. See also python-imenu-format-item-label-function, python-imenu-format-parent-item-label-function, python-imenu-format-parent-item-jump-label-function variables for changing the way labels are formatted in the tree version.

Flymake: A Flymake backend, using the pyflakes program by default, is provided. You can also use flake8 or pylint by customizing python-flymake-command.

Import management: The commands python-sort-imports, python-add-import, python-remove-import, and python-fix-imports automate the editing of import statements at the top of the buffer, which tend to be a tedious task in larger projects. These commands require that the isort library is available to the interpreter pointed at by python-interpreter. The last command also requires pyflakes. These dependencies can be installed, among other methods, with the following command:

    pip install isort pyflakes

Defined variables (114)

inferior-python-mode-abbrev-tableAbbrev table for ‘inferior-python-mode’.
inferior-python-mode-hookHook run after entering ‘inferior-python-mode’.
inferior-python-mode-mapKeymap for ‘inferior-python-mode’.
inferior-python-mode-syntax-tableSyntax table for ‘inferior-python-mode’.
python--f-string-start-regexpA regular expression matching the beginning of an f-string.
python--list-importsScript to list import statements in Python code.
python--not-raw-bytes-literal-start-regexpA regular expression matching the start of a not-raw bytes literal.
python--not-raw-string-literal-start-regexpA regular expression matching the start of a not-raw string literal.
python--prettify-symbols-alistValue for ‘prettify-symbols-alist’ in ‘python-mode’.
python--treesit-settingsTree-sitter font-lock settings.
python-base-mode-abbrev-tableAbbrev table for Python modes.
python-base-mode-hookHook run after entering ‘python-base-mode’.
python-base-mode-mapKeymap for ‘python-base-mode’.
python-base-mode-syntax-tableSyntax table for ‘python-base-mode’.
python-check-buffer-nameBuffer name used for check commands.
python-check-commandCommand used to check a Python file.
python-check-custom-commandInternal use.
python-dotty-syntax-tableDotty syntax table for Python files.
python-eldoc-function-timeoutTimeout for ‘python-eldoc-function’ in seconds.
python-eldoc-function-timeout-permanentIf non-nil, a timeout in Python-Eldoc will disable it permanently.
python-eldoc-get-docNon-nil means eldoc should fetch the documentation automatically.
python-eldoc-setup-codePython code to setup documentation retrieval.
python-ffap-setup-codePython code to get a module path.
python-fill-comment-functionFunction to fill comments.
python-fill-decorator-functionFunction to fill decorators.
python-fill-docstring-styleStyle used to fill docstrings.
python-fill-paren-functionFunction to fill parens.
python-fill-string-functionFunction to fill strings.
python-flymake-commandThe external tool that will be used to perform the syntax check.
python-flymake-command-output-patternSpecify how to parse the output of ‘python-flymake-command’.
python-flymake-msg-alistAlist used to associate messages to their types.
python-font-lock-keywordsList of font lock keyword specifications to use in ‘python-mode’.
python-font-lock-keywords-level-1Font lock keywords to use in ‘python-mode’ for level 1 decoration.
python-font-lock-keywords-level-2Font lock keywords to use in ‘python-mode’ for level 2 decoration.
python-font-lock-keywords-maximum-decorationFont lock keywords to use in ‘python-mode’ for maximum decoration.
python-forward-sexp-functionFunction to use when navigating between expressions.
python-imenu-format-item-label-functionImenu function used to format an item label.
python-imenu-format-parent-item-jump-label-functionImenu function used to format a parent jump item label.
python-imenu-format-parent-item-label-functionImenu function used to format a parent item label.
python-import-historyHistory variable for ‘python-import’ commands.
python-indent-block-paren-deeperIncrease indentation inside parens of a block.
python-indent-current-levelDeprecated var available for compatibility.
python-indent-def-block-scaleMultiplier applied to indentation inside multi-line blocks.
python-indent-guess-indent-offsetNon-nil tells Python mode to guess ‘python-indent-offset’ value.
python-indent-guess-indent-offset-verboseNon-nil means to emit a warning when indentation guessing fails.
python-indent-levelsDeprecated var available for compatibility.
python-indent-offsetDefault indentation offset for Python.
python-indent-trigger-commandsCommands that might trigger a ‘python-indent-line’ call.
python-interpreterPython interpreter for noninteractive use.
python-interpreter-argsArguments for the Python interpreter for noninteractive use.
python-menuPython Mode menu
python-mode-abbrev-tableAbbrev table for ‘python-mode’.
python-mode-hookHook run after entering ‘python-mode’.
python-mode-mapKeymap for ‘python-mode’.
python-mode-skeleton-abbrev-tableAbbrev table for Python mode skeletons.
python-mode-syntax-tableSyntax table for Python files.
python-nav-beginning-of-block-regexpRegexp matching block start.
python-nav-beginning-of-defun-regexpRegexp matching class or function definition.
python-pdbtrack-activateNon-nil makes Python shell enable pdbtracking.
python-pdbtrack-buffers-to-killList of buffers to be deleted after tracking finishes.
python-pdbtrack-continue-commandPdb ‘continue’ command aliases.
python-pdbtrack-exit-commandPdb ‘exit’ command aliases.
python-pdbtrack-kill-buffersIf non-nil, kill buffers when pdbtracking session is over.
python-pdbtrack-prev-command-continueIs t if previous pdb command was ‘continue’.
python-pdbtrack-stacktrace-info-regexpRegular expression matching stacktrace information.
python-pdbtrack-tracked-bufferVariable containing the value of the current tracked buffer.
python-prettify-symbols-alistValue for ‘prettify-symbols-alist’ in ‘python-mode’.
python-shell--block-promptInput block prompt for inferior python shell.
python-shell--capf-cacheVariable to store cached completions and invalidation keys.
python-shell--prompt-calculated-input-regexpCalculated input prompt regexp for inferior python shell.
python-shell--prompt-calculated-output-regexpCalculated output prompt regexp for inferior python shell.
python-shell-buffer-nameDefault buffer name for Python interpreter.
python-shell-compilation-regexp-alist‘compilation-error-regexp-alist’ for inferior Python.
python-shell-completion-native-disabled-interpretersList of disabled interpreters.
python-shell-completion-native-enableEnable readline based native completion.
python-shell-completion-native-output-timeoutTime in seconds to wait for completion output before giving up.
python-shell-completion-native-redirect-bufferBuffer to be used to redirect output of readline commands.
python-shell-completion-native-try-output-timeoutTime in seconds to wait for *trying* native completion output.
python-shell-completion-setup-codeCode used to setup completion in inferior Python processes.
python-shell-dedicatedWhether to make Python shells dedicated by default.
python-shell-enable-font-lockShould syntax highlighting be enabled in the Python shell buffer?
python-shell-eval-file-setup-codeCode used to evaluate files in inferior Python processes.
python-shell-eval-setup-codeCode used to evaluate statements in inferior Python processes.
python-shell-exec-pathList of paths for searching executables.
python-shell-extra-pythonpathsList of extra pythonpaths for Python shell.
python-shell-first-prompt-hookHook run upon first (non-pdb) shell prompt detection.
python-shell-font-lock-enableShould syntax highlighting be enabled in the Python shell buffer?
python-shell-internal-bufferCurrent internal shell buffer for the current buffer.
python-shell-internal-buffer-nameDefault buffer name for the Internal Python interpreter.
python-shell-internal-last-outputLast output captured by the internal shell.
python-shell-interpreterPython interpreter for interactive use.
python-shell-interpreter-argsArguments for the Python interpreter for interactive use.
python-shell-interpreter-interactive-argInterpreter argument to force it to run interactively.
python-shell-process-environmentList of overridden environment variables for subprocesses to inherit.
python-shell-prompt-block-regexpRegular expression matching block input prompt of Python shell.
python-shell-prompt-detect-enabledNon-nil enables autodetection of interpreter prompts.
python-shell-prompt-detect-failure-warningNon-nil enables warnings when detection of prompts fail.
python-shell-prompt-input-regexpsList of regular expressions matching input prompts.
python-shell-prompt-output-regexpRegular expression matching output prompt of Python shell.
python-shell-prompt-output-regexpsList of regular expressions matching output prompts.
python-shell-prompt-pdb-regexpRegular expression matching pdb input prompt of Python shell.
python-shell-prompt-regexpRegular expression matching top level input prompt of Python shell.
python-shell-readline-completer-delimsWord delimiters used by the readline completer.
python-shell-remote-exec-pathList of paths to be ensured remotely for searching executables.
python-shell-setup-codeCode used to setup the inferior Python processes.
python-shell-setup-codesList of code run by ‘python-shell-send-setup-code’.
python-shell-unbufferedShould shell output be unbuffered?.
python-shell-virtualenv-pathPath to virtualenv root.
python-shell-virtualenv-rootPath to virtualenv root.
python-skeleton-autoinsertNon-nil means template skeletons will be automagically inserted.
python-skeleton-availableInternal list of available skeletons.
python-ts-mode-abbrev-tableAbbrev table for ‘python-ts-mode’.
python-ts-mode-hookHook run after entering ‘python-ts-mode’.
python-ts-mode-mapKeymap for ‘python-ts-mode’.

Defined functions (242)

inferior-python-mode()
python--do-isort(&rest ARGS)
python--f-string-p(PPSS)
python--flymake-parse-output(SOURCE PROC REPORT-FN)
python--font-lock-f-strings(LIMIT)
python--imenu-treesit-create-index-1(NODE)
python--import-sources()
python--list-imports(NAME SOURCE)
python--list-imports-check-status(STATUS)
python--parse-json-array(ARG1)
python--query-import(NAME SOURCE PROMPT)
python--string-bytes-literal-matcher(REGEXP START-REGEXP)
python--treesit-defun-name(NODE)
python--treesit-fontify-dotted-decorator(NODE OVERRIDE START END &rest _)
python--treesit-fontify-string(NODE OVERRIDE START END &rest _)
python--treesit-fontify-union-types(NODE OVERRIDE START END &optional TYPE-REGEX &rest _)
python--treesit-fontify-union-types-strict(NODE OVERRIDE START END &rest _)
python--treesit-fontify-variable(NODE OVERRIDE START END &rest _)
python--treesit-syntax-propertize(START END)
python--treesit-variable-p(NODE)
python-add-import(NAME)
python-base-mode()
python-check(COMMAND)
python-comint-output-filter-function(STRING)
python-comint-postoutput-scroll-to-bottom(OUTPUT)
python-completion-at-point()
python-completion-complete-at-point()
python-define-auxiliary-skeleton(NAME &optional DOC &rest SKEL)
python-describe-at-point(SYMBOL PROCESS)
python-do-auto-fill()
python-eldoc--get-doc-at-point(&optional FORCE-INPUT FORCE-PROCESS)
python-eldoc--get-symbol-at-point()
python-eldoc-at-point(SYMBOL)
python-eldoc-function(&rest IGNORED)
python-ffap-module-path(MODULE)
python-fill-comment(&optional JUSTIFY)
python-fill-decorator(&optional JUSTIFY)
python-fill-paragraph(&optional JUSTIFY)
python-fill-paren(&optional JUSTIFY)
python-fill-string(&optional JUSTIFY)
python-fix-imports()
python-flymake(REPORT-FN &rest ARGS)
python-font-lock-assignment-matcher(REGEXP)
python-font-lock-syntactic-face-function(STATE)
python-hideshow-find-next-block(REGEXP MAXP COMMENTS)
python-hideshow-forward-sexp-function(ARG)
python-imenu--build-tree(&optional MIN-INDENT PREV-INDENT TREE)
python-imenu--get-defun-type-name()
python-imenu--put-parent(TYPE NAME POS TREE)
python-imenu-create-flat-index(&optional ALIST PREFIX)
python-imenu-create-index()
python-imenu-format-item-label(TYPE NAME)
python-imenu-format-parent-item-jump-label(TYPE NAME)
python-imenu-format-parent-item-label(TYPE NAME)
python-imenu-treesit-create-flat-index()
python-imenu-treesit-create-index(&optional NODE)
python-import-symbol-at-point()
python-indent--calculate-indentation()
python-indent--calculate-levels(INDENTATION)
python-indent--previous-level(LEVELS INDENTATION)
python-indent-calculate-indentation(&optional PREVIOUS)
python-indent-calculate-levels()
python-indent-context()
python-indent-dedent-line()
python-indent-dedent-line-backspace(ARG)
python-indent-guess-indent-offset()
python-indent-line(&optional PREVIOUS)
python-indent-line-function()
python-indent-post-self-insert-function()
python-indent-region(START END)
python-indent-shift-left(START END &optional COUNT)
python-indent-shift-right(START END &optional COUNT)
python-info-assignment-continuation-line-p()
python-info-assignment-statement-p(&optional CURRENT-LINE-ONLY)
python-info-beginning-of-backslash(&optional LINE-NUMBER)
python-info-beginning-of-block-p()
python-info-beginning-of-statement-p()
python-info-block-continuation-line-p()
python-info-closing-block()
python-info-closing-block-message()
python-info-continuation-line-p()
python-info-current-defun(&optional INCLUDE-TYPE)
python-info-current-line-comment-p()
python-info-current-line-empty-p()
python-info-current-symbol(&optional REPLACE-SELF)
python-info-dedenter-opening-block-message()
python-info-dedenter-opening-block-position()
python-info-dedenter-opening-block-positions()
python-info-dedenter-statement-p()
python-info-docstring-p(&optional SYNTAX-PPSS)
python-info-encoding()
python-info-encoding-from-cookie()
python-info-end-of-block-p()
python-info-end-of-statement-p()
python-info-line-ends-backslash-p(&optional LINE-NUMBER)
python-info-looking-at-beginning-of-block()
python-info-looking-at-beginning-of-defun(&optional SYNTAX-PPSS CHECK-STATEMENT)
python-info-statement-ends-block-p()
python-info-statement-starts-block-p()
python-info-treesit-current-defun(&optional INCLUDE-TYPE)
python-info-triple-quoted-string-p()
python-mark-defun(&optional ALLOW-EXTEND)
python-menu(ARG1)
python-mode()
python-nav--beginning-of-defun(&optional ARG)
python-nav--forward-defun(ARG)
python-nav--forward-sexp(&optional DIR SAFE SKIP-PARENS-P)
python-nav--lisp-forward-sexp(&optional ARG)
python-nav--lisp-forward-sexp-safe(&optional ARG)
python-nav--syntactically(FN POSCOMPFN &optional CONTEXTFN)
python-nav--up-list(&optional DIR)
python-nav-backward-block(&optional ARG)
python-nav-backward-defun(&optional ARG)
python-nav-backward-sexp(&optional ARG SAFE SKIP-PARENS-P)
python-nav-backward-sexp-safe(&optional ARG SKIP-PARENS-P)
python-nav-backward-statement(&optional ARG)
python-nav-backward-up-list(&optional ARG)
python-nav-beginning-of-block()
python-nav-beginning-of-defun(&optional ARG)
python-nav-beginning-of-statement()
python-nav-end-of-block()
python-nav-end-of-defun()
python-nav-end-of-statement(&optional NOEND)
python-nav-forward-block(&optional ARG)
python-nav-forward-defun(&optional ARG)
python-nav-forward-sexp(&optional ARG SAFE SKIP-PARENS-P)
python-nav-forward-sexp-safe(&optional ARG SKIP-PARENS-P)
python-nav-forward-statement(&optional ARG)
python-nav-if-name-main()
python-nav-up-list(&optional ARG)
python-pdbtrack-comint-input-filter-function(INPUT)
python-pdbtrack-comint-output-filter-function(OUTPUT)
python-pdbtrack-process-sentinel(PROCESS EVENT)
python-pdbtrack-set-tracked-buffer(FILE-NAME)
python-pdbtrack-setup-tracking()
python-pdbtrack-tracking-finish()
python-pdbtrack-unset-tracked-buffer()
python-remove-import(NAME)
python-rx(&rest REGEXPS)
python-shell--add-to-path-with-priority(PATHVAR PATHS)
python-shell--calculate-process-environment()
python-shell--encode-string(ARG1)
python-shell--extra-completion-context()
python-shell--get-multiline-input()
python-shell--save-temp-file(STRING)
python-shell--tramp-with-environment(VEC EXTRAENV BODYFUN)
python-shell--with-environment(EXTRAENV BODYFUN)
python-shell-accept-process-output(PROCESS &optional TIMEOUT REGEXP)
python-shell-buffer-substring(START END &optional NOMAIN NO-COOKIE)
python-shell-calculate-command()
python-shell-calculate-exec-path()
python-shell-calculate-pythonpath()
python-shell-comint-end-of-output-p(OUTPUT)
python-shell-comint-watch-for-first-prompt-output-filter(OUTPUT)
python-shell-completion-at-point(&optional PROCESS)
python-shell-completion-complete-at-point(&optional PROCESS)
python-shell-completion-complete-or-indent()
python-shell-completion-extra-context(&optional POS)
python-shell-completion-get-completions(PROCESS INPUT)
python-shell-completion-native-get-completions(PROCESS INPUT)
python-shell-completion-native-interpreter-disabled-p()
python-shell-completion-native-setup()
python-shell-completion-native-toggle(&optional MSG)
python-shell-completion-native-try()
python-shell-completion-native-turn-off(&optional MSG)
python-shell-completion-native-turn-on(&optional MSG)
python-shell-completion-native-turn-on-maybe(&optional MSG)
python-shell-completion-native-turn-on-maybe-with-msg()
python-shell-font-lock-cleanup-buffer()
python-shell-font-lock-comint-output-filter-function(OUTPUT)
python-shell-font-lock-get-or-create-buffer()
python-shell-font-lock-kill-buffer()
python-shell-font-lock-post-command-hook()
python-shell-font-lock-toggle(&optional MSG)
python-shell-font-lock-turn-off(&optional MSG)
python-shell-font-lock-turn-on(&optional MSG)
python-shell-font-lock-with-font-lock-buffer(&rest BODY)
python-shell-get-buffer()
python-shell-get-or-create-process(&optional CMD DEDICATED SHOW)
python-shell-get-process()
python-shell-get-process-name(DEDICATED)
python-shell-get-process-or-error(&optional INTERACTIVEP)
python-shell-internal-get-or-create-process()
python-shell-internal-get-process-name()
python-shell-internal-send-string(STRING)
python-shell-make-comint(CMD PROC-NAME &optional SHOW INTERNAL)
python-shell-output-filter(STRING)
python-shell-package-enable(DIRECTORY PACKAGE)
python-shell-parse-command()
python-shell-prompt-detect()
python-shell-prompt-set-calculated-regexps()
python-shell-prompt-validate-regexps()
python-shell-readline-detect()
python-shell-restart(&optional SHOW)
python-shell-send-block(&optional ARG MSG)
python-shell-send-buffer(&optional SEND-MAIN MSG)
python-shell-send-defun(&optional ARG MSG)
python-shell-send-file(FILE-NAME &optional PROCESS TEMP-FILE-NAME DELETE MSG)
python-shell-send-region(START END &optional SEND-MAIN MSG NO-COOKIE)
python-shell-send-setup-code()
python-shell-send-statement(&optional SEND-MAIN MSG)
python-shell-send-string(STRING &optional PROCESS MSG)
python-shell-send-string-no-output(STRING &optional PROCESS)
python-shell-switch-to-shell(&optional MSG)
python-shell-tramp-refresh-process-environment(VEC ENV)
python-shell-tramp-refresh-remote-path(VEC PATHS)
python-shell-with-environment(&rest BODY)
python-shell-with-shell-buffer(&rest BODY)
python-skeleton--else(&optional STR ARG)
python-skeleton--except(&optional STR ARG)
python-skeleton--finally(&optional STR ARG)
python-skeleton-add-menu-items()
python-skeleton-class(&optional STR ARG)
python-skeleton-def(&optional STR ARG)
python-skeleton-define(NAME DOC &rest SKEL)
python-skeleton-for(&optional STR ARG)
python-skeleton-if(&optional STR ARG)
python-skeleton-import(&optional STR ARG)
python-skeleton-try(&optional STR ARG)
python-skeleton-while(&optional STR ARG)
python-sort-imports()
python-syntax--context-compiler-macro(FORM TYPE &optional SYNTAX-PPSS)
python-syntax-closing-paren-p()
python-syntax-comment-or-string-p(&optional PPSS)
python-syntax-context(TYPE &optional SYNTAX-PPSS)
python-syntax-context-type(&optional SYNTAX-PPSS)
python-syntax-count-quotes(QUOTE-CHAR &optional POINT LIMIT)
python-syntax-stringify()
python-ts-mode()
python-util-clone-local-variables(FROM-BUFFER &optional REGEXP)
python-util-comint-end-of-output-p()
python-util-comint-last-prompt()
python-util-forward-comment(&optional DIRECTION)
python-util-goto-line(LINE-NUMBER)
python-util-list-directories(DIRECTORY &optional PREDICATE MAX-DEPTH)
python-util-list-files(DIR &optional PREDICATE)
python-util-list-packages(DIR &optional MAX-DEPTH)
python-util-popn(LST N)
python-util-strip-string(STRING)
python-util-valid-regexp-p(REGEXP)
run-python(&optional CMD DEDICATED SHOW)
run-python-internal()

Defined faces (0)