On Wed, Mar 10, 2010 at 8:34 AM, Victor Subervi <victorsube...@gmail.com> wrote: > On Wed, Mar 10, 2010 at 12:31 PM, Chris Rebert <c...@rebertia.com> wrote: >> Option C. The most user-friendly, and in some sense simplest, one. >> Figure out the "conversation tree" vpopmail follows. Create a matching >> form tree workflow, presenting multiple input fields at once. Run >> vpopmail and write the appropriate input to its stdin based on the >> form data. Send the output back as a webpage. > > Yeah, that was my idea. But how does the program know when it's being > prompted to enter data? That's my question ;)
There's no magical "prompt time". The process's stdin's openness to writing is not conditional. Just send it all the input at once with the proper newlines in place and it should work just fine assuming the user input was valid (barring vpopmail using some fancy terminal input malarkey like curses). Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list