help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing an interactive function to accept a string argument, then call a


From: Endless Story
Subject: Writing an interactive function to accept a string argument, then call a Python script?
Date: 9 Feb 2007 05:08:16 -0800
User-agent: G2/1.0

I have hacked out a Python script to do something trivial but
reasonably valuable to me (search a bunch of files for a matching
string pulled from another file). Well, okay, now I want to call this
script from the Emacs minibuffer ... but my understanding of lisp is
pretty poor, which is why I wrote the script in Python to begin with!
(took me a couple of hours instead of a month).

Can anyone give me a simple recipe for an interactive function that
will do the following:

1) In the minibuffer, prompt me for a string to enter.
2) Feed the string as the sole argument to the Python script (let's
say it's at /home/me/myscript.py).
3) Display the return value in the minibuffer

Much thanks -



reply via email to

[Prev in Thread] Current Thread [Next in Thread]