Sponsored Content
Operating Systems OS X (Apple) Back on python for the AMIGA again and discovered this little gem... Post 303036669 by wisecracker on Sunday 7th of July 2019 10:21:35 AM
Old 07-07-2019
Back on python for the AMIGA again and discovered this little gem...

I am back on Python for the AMIGA again and discovered this little gem that exits the program:-
(If you search GOOGLE as 'os.sys.exit()' python nothing seems to appear.)

Code:
import os
os.sys.exit()

I know of the other four and how they apply but I have no idea whether this creates any zombies or memory holes or whatever.
Code:
import os
import sys
"""
sys.exit()
os._exit()
exit()
quit()
"""

Just thought you might like to know guys as I still code for the lowly AMIGA and its latest version of Python is an unreliable Version 2.4.6 and its earliest is 1.4.0 which I use a lot still...
The code in the top code block works from Version 1.4.0 on the AMIGA and an installed 3.5.2 on my MBP.
These 2 Users Gave Thanks to wisecracker For This Post:
 

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

A journey down memory lane - AMIGA...

Hi guys and gals... Who still plays with the AMIGA in any of its guises? I have a classic A1200(HD) on 24/7 and still build and code for it... Also _clones_ of the same machine using WinUAE and E-UAE... It still has that one major beauty for this 62 year old - moi - it is FUN! ;o) (2 Replies)
Discussion started by: wisecracker
2 Replies

2. What is on Your Mind?

Ah, the AMIGA, (another poem I wrote in 2005).

Well I wrote this in 2005 and uploaded to AMINET.as a commemoration of a machine that is still in use today. It is now 29 years since this machne came into being. Phenominal and it is still being supported- WOW! My A1200 is on 24/7 and I use it to test code developed on AMIGA emulators... ... (0 Replies)
Discussion started by: wisecracker
0 Replies

3. News, Links, Events and Announcements

GCC for tha AMIGA...

Hi guys... For the AMIGA fans out there... Not sure if this is the right forum but someone has done a successful working port of gcc for the classic AMIGA A1200. It contains a very large subset of *NIX commands and now AMIGA fanatics like me can include another platform, within the... (0 Replies)
Discussion started by: wisecracker
0 Replies

4. OS X (Apple)

FFT for the AMIGA through ksh88 shell.

I don't know if anyone is interested but I have been meddling with FFT for the AMIGA. (Sadly we AMIGAns don't have these luxuries through any scripting language. Below is a Python snippet that uses the builtin 'cmath' module to work with the lowly Python 2.0.1 for the AMIGA. It is part of a... (0 Replies)
Discussion started by: wisecracker
0 Replies

5. What is on Your Mind?

The AMIGA, great or flop. Your memories...

Hi everybody... Anyone who sees posts from me see the word AMIGA on my machines' terminal prompts. AMINET is the oldest Internet SW repository and currently holds 82,800+ freely available SW packages. About Aminet - AminetWiki I am a member of LAG, (Linclonshire Amiga Group), in the... (5 Replies)
Discussion started by: wisecracker
5 Replies
IDLE(1) 						      General Commands Manual							   IDLE(1)

NAME
IDLE - An Integrated DeveLopment Environment for Python SYNTAX
idle [ -dins ] [ -t title ] [ file ...] idle [ -dins ] [ -t title ] ( -c cmd | -r file ) [ arg ...] idle [ -dins ] [ -t title ] - [ arg ...] DESCRIPTION
This manual page documents briefly the idle command. This manual page was written for Debian because the original program does not have a manual page. For more information, refer to IDLE's help menu. IDLE is an Integrated DeveLopment Environment for Python. IDLE is based on Tkinter, Python's bindings to the Tk widget set. Features are 100% pure Python, multi-windows with multiple undo and Python colorizing, a Python shell window subclass, a debugger. IDLE is cross-plat- form, i.e. it works on all platforms where Tk is installed. OPTIONS
-h Print this help message and exit. -n Run IDLE without a subprocess (see Help/IDLE Help for details). The following options will override the IDLE 'settings' configuration: -e Open an edit window. -i Open a shell window. The following options imply -i and will open a shell: -c cmd Run the command in a shell, or -r file Run script from file. -d Enable the debugger. -s Run $IDLESTARTUP or $PYTHONSTARTUP before anything else. -t title Set title of shell window. A default edit window will be bypassed when -c, -r, or - are used. [arg]* and [file]* are passed to the command (-c) or script (-r) in sys.argv[1:]. EXAMPLES
idle Open an edit window or shell depending on IDLE's configuration. idle foo.py foobar.py Edit the files, also open a shell if configured to start with shell. idle -est "Baz" foo.py Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell window with the title "Baz". idle -c "import sys; print sys.argv" "foo" Open a shell window and run the command, passing "-c" in sys.argv[0] and "foo" in sys.argv[1]. idle -d -s -r foo.py "Hello World" Open a shell window, run a startup script, enable the debugger, and run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in sys.argv[1]. echo "import sys; print sys.argv" | idle - "foobar" Open a shell window, run the script piped in, passing '' in sys.argv[0] and "foobar" in sys.argv[1]. SEE ALSO
python(1). AUTHORS
Various. 21 September 2004 IDLE(1)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy