Printing with raw_input

Shashwat Anand anand.shashwat at gmail.com
Mon Feb 15 08:11:32 EST 2010


raw_input uses sys.stderr I guess ?

On Mon, Feb 15, 2010 at 5:35 PM, Peter Otten <__peter__ at web.de> wrote:

> Joan Miller wrote:
>
> >> > Does `raw_input` uses internally `sys.stdout.write`?
>
> > It was to display the output inside a GUI app. overriding
> > `sys.stdout`. And as `print` also uses internally `sys.stdout.write`
> > then can be used `print` the shell script and get the output too in
> > the GUI, cann't it?
>
> It should be easy to collect data written with print and show it in a gui,
> but I can't see how you would integrate raw_input() into a gui app.
>
> As to shell scripts, you can invoke them via subprocess, or, if the script
> needs user interaction, via pexpect.
>
> Peter
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100215/79631b5f/attachment.html>


More information about the Python-list mailing list