469,602 Members | 1,751 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

print statements not sent to nohup.out


Just a quick question.. what do I need to do so that my print statements are
caught by nohup??

Yes, I should probably be 'logging'... but hey..

Thanks!
--
View this message in context: http://www.nabble.com/print-statemen...p20152780.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 24 '08 #1
2 6071
On Oct 24, 11:58*am, "John [H2O]" <washa...@gmail.comwrote:
Just a quick question.. what do I need to do so that my print statements are
caught by nohup??

Yes, I should probably be 'logging'... but hey..

Thanks!
--
View this message in context:http://www.nabble.com/print-statemen...p.out-tp201527...
Sent from the Python - python-list mailing list archive at Nabble.com.
They should be 'out of the box' as nohup is simply going to redirect
standard output. You're probably seeing buffering at work. Are you
including the default newline or are you ending your print statements
with a ',' to suppress? If you're doing the latter, you'll need to
flush sys.stdout or run Python with a '-u' option to disable std(in|
out|err) buffering.
Oct 25 '08 #2
On Oct 24, 11:58*am, "John [H2O]" <washa...@gmail.comwrote:
Just a quick question.. what do I need to do so that my print statements are
caught by nohup??

Yes, I should probably be 'logging'... but hey..

Thanks!
--
View this message in context:http://www.nabble.com/print-statemen...p.out-tp201527...
Sent from the Python - python-list mailing list archive at Nabble.com.
You should get that out of the box. Chances are it's due to
buffering. Are you ending your print statements with a comma? If so,
you'll need to either sys.stdout.flush(), or run python with a '-u'
switch.
Oct 25 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Nosmada | last post: by
3 posts views Thread by mmccaws | last post: by
14 posts views Thread by Marcin Ciura | last post: by
1 post views Thread by Joannes Vermorel [MVS] | last post: by
1 post views Thread by Steff | last post: by
1 post views Thread by g.willgoose | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.