emacs.py

Terrence M. Brannon (brannon@jove.cs.caltech.edu)
Mon, 13 Jul 92 18:21:43 PDT

# Initial attempt to make emacs a useable object of python
# This code will be imported from a python interpreter that is running
# as an inferior process of emacs

start_marker = '+'
end_marker = '~'

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

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

def buffer_menu ():
eval( 'buffer-menu(buffer-list)' )
print 'method buffer_menu():'

print 'module py_emacs loaded.'