473,414 Members | 1,627 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Premature End

I was wondering what the code would be to prematurely end a script you are running?

Thanks,
Jordan
Aug 26 '07 #1
2 1495
bartonc
6,596 Expert 4TB
I was wondering what the code would be to prematurely end a script you are running?

Thanks,
Jordan
Expand|Select|Wrap|Line Numbers
  1. import sys
  2. #
  3. # your program
  4. #
  5. sys.exit()
The optional argument arg can be an integer giving the exit status (defaulting to zero), or another type of object. If it is an integer, zero is considered ``successful termination'' and any nonzero value is considered ``abnormal termination'' by shells and the like. Most systems require it to be in the range 0-127, and produce undefined results otherwise.
Aug 26 '07 #2
Expand|Select|Wrap|Line Numbers
  1. import sys
  2. #
  3. # your program
  4. #
  5. sys.exit()
Okay, that works perfectly.

Thanks,
Jordan
Aug 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Seagull Manager | last post by:
Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions on apache manual and php manual (as far as I can see), but getting "internal server error" in browser... log says "Premature...
1
by: Jason Ho-Ching | last post by:
Can anyone tell me about this error I am getting? Premature end of script headers: main.php Thanks! ##-----------------------------------------------## Article posted from PHP Freaks...
0
by: Greeshma | last post by:
Hi all, I have successfully configured Apache 2.0.4 with RedHat 7.3 and use Python 2.2.3 for cgi scripts. When I start Apache manually through /usr/local/apache/bin/apachectl startssl, I can...
1
by: Jatinder Singh | last post by:
I am running a CGI Programme. which is throwing Premature script error for some inputs. I have checked and couldn't fig out the problem. Even error log is empty. Can anybody help me out of this...
1
by: nomadx | last post by:
hello, could someone please check this out? #usr/local/bin/perl # Filelist.pl version 0.1 use strict; use CGI qw(:all); use CGI::Pretty; #use CGI::Carp qw(fatalsToBrowser); use Cwd; my...
1
by: Wayne Deleersnyder | last post by:
Hi, I'm a newbie at Perl and CGI and hoping someone can point me in the right direction. Recently I've been going through an older book I have on CGI programming to get a start. Most of it...
5
by: Erich Schreiber | last post by:
In the Python Library Reference the explanation of the time.sleep() function reads amongst others: > The actual suspension time may be less than that requested because > any caught signal will...
2
by: Ian Sykes | last post by:
I have a C# program which terminates prematurely, with no error or exception being raised, the termination point varying with what diagnostic code is present. The termination point appears to be...
5
by: kardon33 | last post by:
Im getting these errors when i use a module, could anyone tell me what they think wrong, its the second one that i think it the problem but i don't know what it means so i cant fix it, Thank you. ...
1
by: Christoph Burschka | last post by:
I have compiled PHP 5.2.3 as a CGI binary, and this works. I can, for example, do the following: $ php.cgi hello_world.php X-Powered-By: PHP/5.2.3 Content-type: text/html Hello World! ===
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.