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.

- name: pyflakes installed
    name: pyflakes
    state: installed
  when: ansible_pkg_mgr == "apt"

- name: xmonad and friends are installed
    name: pyflakes
    state: installed
  when: ansible_pkg_mgr == "dnf"


Author: Ryan Rix

Created: 2019-04-23 Tue 16:51

Validate XHTML 1.0