473,461 Members | 1,099 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IDLE traceback on sys.exit()

Something to think about...I'm not sure if this is a problem for anyone.

IDLE currently issues a traceback when running a program which contains sys.exit(). For example, the program:

if __name__ == "__main__":
sys.exit(False)

shows the following in the IDLE shell window:

Traceback (most recent call last):
File "C:\rascal\dev\pylearn\odbchelpertest.py", line 8, in -toplevel-
sys.exit(False)
SystemExit: False

If that's the way it's supposed to work, fine.

But unittest wraps up the runTests() function with the line:

sys.exit(not result.wasSuccessful())

So, I always get a traceback whenever I run a test program in IDLE. (The command-line invocation works silently, which I would expect.)

My resolution is simple: I won't use IDLE to exercise my unit tests.

Python 2.3b2 (#43, Jun 29 2003, 16:43:04) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
IDLE 1.0b2

Jul 18 '05 #1
0 1467

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

Similar topics

1
by: Vin Jovanovic | last post by:
Trying to start Python IDLE through Start>Programs>Python 2.3> IDLE doesn't work From DOS ... I get this .... C:\>python C:\Python23\Lib\idlelib\idle.py Traceback (most recent call last):...
0
by: John F Dutcher | last post by:
Having 'cloned' an existing python script that imports 'string' and uses "string.rstrip()" without incident... I am at a loss to explain why the new 'cloned' script (brief sample below)...
16
by: Kerry Neilson | last post by:
For the past couple of months, Idle won't start when I invoke it. I am at a complete loss for why this is. When this happens, they python command line still starts, and python works fine...
0
by: Snake | last post by:
I recently installed Python 2.3.4 on WinXP. The command line interpreter works fine, but the IDLE GUI will not start. I have both WinXP and McAfee firewalls disabled. When I run IDLE from a...
0
by: Brian van den Broek | last post by:
Hi all, IDLE refuses to launch, and I believe it is because I attempted to define a custom key-binding that it doesn't like. I was recently defining a custom keybinding in IDLE 1.1 under...
8
by: Jonathan Polley | last post by:
I have one account on a WindowsXP machine that refuses to run IDLE (or any other python script that uses Tk). Other people can login to that PC and IDLE runs just fine, so it is not an...
1
by: gjohannes | last post by:
Hi. I use Idle 1.1.1 on Python 2.4.1. The "Ctrl-" key bindings for indenting do not work on non-us keyboards where brackets are accessed by the "Alt Gr" key. The Tab key seem to work for...
11
by: a.serrano | last post by:
Hello, the following program prompts the user for a word and tests to see if it is the same as another one. If the user types "españa" (note that the word contains an 'ñ'), the program should...
0
by: brianrpsgt1 | last post by:
Using OS X 10.5.5 Python 2.5.1 IDLE was working, then all of a sudden, the window size went off of the screen.... could not resize it. I closed IDLE and rebooted and now IDLE will not start. ...
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
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
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
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,...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.