Guido van Rossum | 4732ccf | 1992-08-09 13:54:50 +0000 | [diff] [blame] | 1 | # Execute Emacs code from a Python interpreter. |
| 2 | # This code should be imported from a Python interpreter that is |
| 3 | # running as an inferior process of Emacs. |
| 4 | # See misc/py-connect.el for the companion Emacs lisp code. |
| 5 | # Author: Terrence M. Brannon. |
| 6 | |
| 7 | start_marker = '+' |
| 8 | end_marker = '~' |
| 9 | |
| 10 | def eval (string): |
| 11 | tmpstr = start_marker + '(' + string + ')' + end_marker |
| 12 | print tmpstr |
| 13 | |
| 14 | def dired (directory): |
| 15 | eval( 'dired ' + '"' + directory + '"' ) |
| 16 | |
| 17 | def buffer_menu (): |
| 18 | eval( 'buffer-menu(buffer-list)' ) |