diff options
| author | Guido van Rossum <guido@python.org> | 1992-08-09 13:54:50 (GMT) | 
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1992-08-09 13:54:50 (GMT) | 
| commit | 4732ccf6425b155cf7b2eb22c2dd071b97a462ff (patch) | |
| tree | 77d1872d68bf4415a88c1424e854c2761413ccbf /Lib/emacs.py | |
| parent | 21803b8a6f9e78fc220bf95658182f7ca3265173 (diff) | |
| download | cpython-4732ccf6425b155cf7b2eb22c2dd071b97a462ff.zip cpython-4732ccf6425b155cf7b2eb22c2dd071b97a462ff.tar.gz cpython-4732ccf6425b155cf7b2eb22c2dd071b97a462ff.tar.bz2  | |
Added emacs.py (for misc/py-connect.el).
posixpath.py: added undocumented expanndvars() (expands $VAR in string).
Diffstat (limited to 'Lib/emacs.py')
| -rw-r--r-- | Lib/emacs.py | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/emacs.py b/Lib/emacs.py new file mode 100644 index 0000000..ffce099 --- /dev/null +++ b/Lib/emacs.py @@ -0,0 +1,18 @@ +# 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)' )  | 
