Revision d4901c890adc29d6e1440bc5a815da531a81fe16 authored by Guido van Rossum on 28 August 1995, 03:12:57 UTC, committed by Guido van Rossum on 28 August 1995, 03:12:57 UTC
1 parent e7017ba
Raw File
emacs.py
# Execute Emacs code from a Python interpreter.
# This code should be imported from a Python interpreter that is
# running as an inferior process of Emacs.
# See misc/py-connect.el for the companion Emacs lisp code.
# Author: Terrence M. Brannon.

start_marker = '+'
end_marker   = '~'

def eval (string):
	tmpstr = start_marker + '(' + string + ')' + end_marker
	print tmpstr

def dired (directory):
	eval( 'dired ' + '"' + directory + '"' )

def buffer_menu ():
	eval( 'buffer-menu(buffer-list)' )
back to top