Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Opening an editor for interactive use

    1 answers - 633 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    (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
    $EDITR session for the check-in log entry.
    I tried os.popen, but it fired off vim in the background 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't there be a cleaner way?
    Thanks
    W
  • No.1 | | 687 bytes | |

    "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
    $EDITR session for the check-in log entry.

    I tried os.popen, but it fired off vim in the background 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>

Re: Opening an editor for interactive use


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Development"

EMSDN.COM