#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    3
    Rep Power
    0

    Question how execute programs like this under python: byob -review<test.txt>tmp.txt


    this program excuted under unix like this:

    byob preview < test.txt >tmp.txt

    it takes input from stdin and output stdout. Please teach me
    how to excute it under python using os.execv. Thanks

    zhiqun
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    14
    You wouldn't use os.execv, you'd use os.popen (or one of its family members) - http://www.python.org/doc/current/li...#os-newstreams
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.

IMN logo majestic logo threadwatch logo seochat tools logo