Opening an editor for interactive use
Fredrik Lundh
fredrik at pythonware.com
Fri Jun 16 15:11:59 EDT 2006
"Webb" wrote:
> (I am sure there is a recipe somewhere, but I can't find it.) How does
> one open an editor while in the middle of an interactive program, let
> the user do some editing and closing, and then capture the text that
> was edited? I am reminded of subversion or CVS when they open an
> $EDITOR session for the check-in log entry.
>
> I tried os.popen, but it fired off vim in the background--not useful.
> Then I tried os.system, but that only returns the return code (126 in
> my case) after you close the editor. Perhaps I need to write to a file
> and read it
that's exactly how it's done in subversion and cvs, of course.
</F>
More information about the Python-list
mailing list