473,586 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6534
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.flus h(), or run python with a '-u'
switch.
Oct 25 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6744
by: Nosmada | last post by:
Here is my php command that I am using from an SSH Command line prompt (apache/linux server): php scriptname.php all If this were cgi I would normally execute the command like this: nohup perl scriptname.cgi --all > log.txt & Then I can quite and come back and the script will still run and I can
3
2241
by: mmccaws | last post by:
Thanks ahead for your help I'm trying to learn what I can do with echo and print statements. I figured out the echo statement and below is the simple version using print. I've tried two dozen or more single print statements, first start with the first part then adding additional phrases, then looking at the page source code, but I'm...
14
2899
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version: $Revision: 0.0 $
1
275
by: Joannes Vermorel [MVS] | last post by:
I am implementing a .Net application (scientific computing) that basically requires a couple of days to terminate on a single desktop. Until now, I was using Mono (a .Net port) to run it on a Linux server. To achieve that, I was using the command-line $ nohup mono MyApp.exe & I have WinXP machine that I can access through Remote Desktop,...
0
1437
by: Paul | last post by:
Occasionally my users will try to perform an action and be presented with an exception raised directly from SQL Server, in example: SET @err = 'a user-friendly error condition message' RAISERROR(@err, 16, 1, 1) RETURN The exception type thrown is a System.Data.SqlClient.SqlException, and its message property holds the exception text....
5
2841
by: MLH | last post by:
I use a fair number of debug.print statements. My apps are fairly well 'peppered' with them. I've often wondered if leaving them in the mdb, creating and rolling out an mde intended for use in the A97 runtime environment might ever be cause for concern. I've noticed no symptoms to indicate a problem. Are there drawbacks to this practice?
1
2317
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php but now I am not sure if that makes sense. Can you tell me please ? <html> <head>
3
6593
by: Dmitri | last post by:
Hello! I have a developer that is playing around with some SQL statements using VB.NET. He has a test table in a SQL 2000 database, and he has about 2000 generated INSERT statements. When the 2000 INSERT statements are run in SQL query analyzer, all 2000 rows are added to the table. When he tries to send the 2000 statements to SQL Server...
1
3686
by: g.willgoose | last post by:
I'm new to Python and am evaluating moving a project from Tcl/Tk to Python and am stuck on one issue. How can I nohup (or any detached task for that matter) a process and get its PID in Python. The obvious route of (with a trivial example) os.system("nohup ls junk &") returns the status of the command execution (ie. 0). I wish to get the...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3838
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.