[Baypiggies] Want to redirect output to a csv file

Tony Cappellini cappy2112 at gmail.com
Mon Apr 21 03:51:38 CEST 2008

Assuming your "imported file" outputs to stdout

python somefile.py > csv_output.txt

should work.

somefile.py is the module which is importing your file.
Without knowing how your "imported file" is creating output, the above
solution may or may not work.

Another option would be to use the csv module and write to the output file
directly, without redirection.

On Sun, Apr 20, 2008 at 5:24 PM, Tabatchnick, Justin <
justin.tabatchnick at intel.com> wrote:

>  Hi
> I am running an imported file and want to redirect the output to a csv
> file , what is the best way to accomplish this ?
> Thanks
> Justin Tabatchnick
> Intel, Folsom
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/baypiggies/attachments/20080420/ad7f3aaa/attachment.htm 

More information about the Baypiggies mailing list