Emacs for Python Programming

Slides:



Advertisements
Similar presentations
Introduction to the SPL Interpreter
Advertisements

Site Collection, Sites and Sub-sites
Creating a Dialog-Based Comet Windows Program Brian Levantine.
en-us/sharepoint/fp
XEmacs Tips for Programmers A lunchtime seminar. XEmacs Background  XEmacs not Emacs on Linux hosts  XEmacs is a specialized LISP interpreter  Built-in.
Title Center for Coastal and Ocean Mapping NOAA/UNH Joint Hydrographic Center 31-Oct-2006 A Python Tutorial Kurt Schwehr 31 Oct 2006.
How to install the Zelle graphics package
Introduction to Python: Slides Referenced in Homework 0 CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth January 2005.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Source code indexer. What does it do?  Indexes source code for fast lookups of methods, variables, structs, macros, …  But LXR does this… Ctags can.
Operating System Program 5 I/O System DMA Device Driver.
ICP Kit 2011 HHC Data Entry Module The World Bank ICP Kit Training African Development Bank.
October 5, 2015 Pretty Programming and Packaging with Python Fedor Baart, Genna Donchyts, Hessel Winsemius Slides and course material will be made available.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Title Center for Coastal and Ocean Mapping NOAA/UNH Joint Hydrographic Center 31-Oct-2006 A Python Tutorial Kurt Schwehr 31 Oct 2006.
Oracle Data Integrator Procedures, Advanced Workflows.
EMACS Jim Vallino Proud emacs user since The truth about editors Editors are like religions. Everyone has one that they like.
DOS and the Command Line CS 21a: Introduction to Computing I First Semester,
Chapter Three The UNIX Editors.
Suite TUG 2008, Orlando zTPFGI for Applications Jeff Longwell.
Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Prepare Launch Spyder Open Spyder (C:/Anaconda2/Scripts/spyder) Or Open from launcher (C:/Anaconda2/Scripts/launcher) Download data
PVS-Studio, a static analyzer detecting errors in the source code of C/C++/C++11 applications.
Chapter 3: Mastering Editors Chapter 3 Mastering Editors (Emacs)
How to fix Windows 10 apps crashing or not opening errors.
Being Productive With Emacs Part 2
Fundamental of Databases
Development Environment
Command Line Basics.
Version Control.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
State of Testing Jason Kenny – ATS committer.
FTP Lecture supp.
7/2/2018 3:48 AM BRK3394: Visual Studio Code The most useful (and underused!) tips and tricks Chris Dias Principal Program Manager VS Code © Microsoft.
DATA MINING Python.
Guide To UNIX Using Linux Third Edition
A451 Theory – 7 Programming 7A, B - Algorithms.
Internationalizing your application with Quickly
Top 5 Front End Development Tools. 1. Sublime Text Sublime Text may be a super quick and have packed text and development editor. If you're about to be.
Prepared by Kimberly Sayre and Jinbo Bi
Quick Start Guide for Visual Studio 2010
Test Automation For Web-Based Applications
VIM - Vi IMproved Bryce Handerson
TRANSLATORS AND IDEs Key Revision Points.
Do you know this browser?...
Femap API Introduction
Introduction to Python programming
Automating reports with Python
Lesson Objectives Aims Key Words
Soar IDE 2.0 Bob Marinier, Kyle Aron, Preetom Chakraborty 12/8/2018.
Getting Started: Developing Code with Cloud9
EMSE 6574 – Programming for Analytics: Python 101 – Python Enviornments Joel Klein.
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
Manipulating and Sharing Data in a Database
Lecture 5: Functions and Parameters
Installing and running the local check and grader projects in Eclipse
IDE’s and Debugging.
QVT Operational 1.0 Ganymede Simultaneous Release Graduation Review
Windows Installation Tutorial
Week 1 – Lesson 2: Creating Shell Scripts, Linux Commands
Introduction to Emacs J. Caldwell, N. McCaw, D. Powell
Chapter 1: Programming Basics, Python History and Program Components
By Rajanikanth B Eclipse IDE Overview By Rajanikanth B
Running & Testing :: IDEs
Coming to all courses August 31st
Coming to all courses August 31st
Python Modules.
Presentation transcript:

Emacs for Python Programming Vinod Kurup @vkurup October 20th, 2012

Hi Vinod! Addiction may be a strong word, but emacs is certainly a lifestyle choice.

Emacs users

Non-addicts (yet!)

Let's talk about... Python-specific features General programming features Why I'm an addict for life

But first ...

How to safely play with Emacs Control-x Control-c quits (C-x C-c) C-g is your friend Plan to mess up vinod:~$ rm -r .emacs.d .emacs vinod:~$ emacs You're good to go again!

but only if you use the default settings Emacs Sucks! but only if you use the default settings

M-x package-install RET starter-kit RET Emacs Starter Kit M-x package-install RET starter-kit RET

Other nice starting points Emacs Prelude http://batsov.com/prelude/ Emacs Live https://github.com/overtone/emacs-live

Emacs Python IDE

Features Syntax highlighting Auto-Indentation Code completion Documentation lookup Code lookup / navigation Error highlighting (on-the-fly) Code runner Test runner Debugging

Python's is a bit of a mess Major mode Python's is a bit of a mess

Use python-mode.el https://launchpad.net/python-mode M-x package-install RET python-mode RET

Syntax highlighting

Automatic indentation

Code completion

Documentation lookup

Code lookup

Error highlighting

Code runner Send the current buffer to Python Choose your interpreter C-c C-c Choose your interpreter (setq python-python-command "ipython") Choose your virtualenv (virtualenv-workon "myproject") or M-x virtualenv-workon RET myproject RET

Test runner

Debugging

Brief HOWTO

Brief Howto Python Emacs (emacs)vinod:~ $ pip freeze Pymacs==0.25 pep8==1.3.3 pyflakes==0.5.0 pylint==0.25.2 rope==0.9.4 ropemacs==0.7 ropemode==0.2 wsgiref==0.1.2 (defvar my-packages '(starter-kit starter-kit-bindings yasnippet pony-mode markdown-mode auto-complete python-mode autopair) "A list of packages installed at launch.") Python Emacs

Brief Howto (setq py-load-pymacs-p t) (require 'python-mode) (require 'auto-complete-config) (ac-config-default) (require 'autopair) (autopair-global-mode) (shell) (add-to-list 'load-path "~/.emacs.d/vendor/") (virtualenv-workon "emacs/") (require 'pymacs) (pymacs-load "ropemacs" "rope-") (setq ropemacs-enable-autoimport t) ;; pyflakes flymake integration ;; http://stackoverflow.com/a/1257306/347942 (when (load "flymake" t) (defun flymake-pyflakes-init () (let* ((temp-file (flymake-init-create-temp- buffer-copy 'flymake-create-temp-inplace)) (local-file (file-relative-name temp-file (file-name-directory buffer- file-name)))) (list "pycheckers" (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pyflakes-init))) (add-hook 'python-mode-hook 'flymake-mode)

Non-python stuff

Magit mode

Help in emacs C-h t => tutorial C-h f => function docs C-h v => variable docs C-h k => keybindings Emacs can teach you emacs

Dired mode

Keyboard Macros

Pretty Themes

Shell modes

And more!! Kill ring yasnippet org-mode ace-jump

Emacs for life!

One interface to rule them all

Infinitely customizable

Stands the test of time

Eight Megs And Constantly Swapping (Mine takes 41M now, though)