Complete Computing Environment: Python Programming

Table of Contents

(provide 'cce-python)

Python Programming with Elpy

I do a bit of Python work in my day-to-day. Not much, but enough that it should be supported in my optimal workflow. I am not super duper opinionated on Python practices, opting for the simplest means necessary to create "Pythonic" Python, the wonderful Elpy1.

(install-pkgs '(elpy))

Make sure Elpy gets enabled on all Python buffers.

(eval-after-load 'python (lambda ()
                           (diminish 'elpy-mode "[ELPY]")
                           (add-hook 'python-mode-hook 'elpy-mode)))

Elpy installs Eldoc-compatible python documentation code, so if we turn on Eldoc, we get inline documentation.

(add-hook 'python-mode-hook 'eldoc-mode)

Elpy uses flymake to do its syntax checking, which requires Ruby being installed; it uses pyflakes to do the actual checking, so we'll need to install both.

deb-install ruby
rpm-install ruby
pip install --user pyflakes

Footnotes:

Author: Ryan Rix

Created: 2017-03-31 Fri 15:22

Validate XHTML 1.0