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
DH_PYTHON(1)							     Debhelper							      DH_PYTHON(1)

NAME
dh_python - calculates Python dependencies and adds postinst and prerm Python scripts (deprecated) SYNOPSIS
dh_python [debhelperoptions] [-n] [-V version] [moduledirs...] DESCRIPTION
Note: This program is deprecated. You should use dh_python2 instead. This program will do nothing if debian/pycompat or a Python-Version control file field exists. dh_python is a debhelper program that is responsible for generating the ${python:Depends} substitutions and adding them to substvars files. It will also add a postinst and a prerm script if required. The program will look at Python scripts and modules in your package, and will use this information to generate a dependency on python, with the current major version, or on pythonX.Y if your scripts or modules need a specific python version. The dependency will be substituted into your package's control file wherever you place the token ${python:Depends}. If some modules need to be byte-compiled at install time, appropriate postinst and prerm scripts will be generated. If already byte- compiled modules are found, they are removed. If you use this program, your package should build-depend on python. OPTIONS
module dirs If your package installs Python modules in non-standard directories, you can make dh_python check those directories by passing their names on the command line. By default, it will check /usr/lib/site-python, /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages. Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the extra names on the command line are searched for binary (.so) modules. -V version If the .py files your package ships are meant to be used by a specific pythonX.Y version, you can use this option to specify the desired version, such as 2.3. Do not use if you ship modules in /usr/lib/site-python. -n, --noscripts Do not modify postinst/prerm scripts. CONFORMS TO
Debian policy, version 3.5.7 Python policy, version 0.3.7 SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Josselin Mouette <joss@debian.org> most ideas stolen from Brendan O'Dea <bod@debian.org> 9.20120909 2011-12-06 DH_PYTHON(1)
All times are GMT -4. The time now is 08:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy