06-08-2017
Quote:
Originally Posted by
wisecracker
Hi RudiC...
So one is allowed to execute code AFTER exit has been called even if it is an ASCII string inside a variable, from awk AND Python and I thought Python was strict, what about Perl and others?
You don't "execute code AFTER exit" - you add one (or more) routines to the sequence of tasks the programme has to perform before giving control back to the caller, e.g. closing files, releasing locks, freeing allocated memory. If it is a
write, you'd mayhap do it before stdout is closed, if it is just a number, you reference it just on exiting.
Quote:
Awk's exit is a statement and Python's is a function.
Both - whatever they are - start quitting the programme.
Quote:
Maybe it is just me but this should never be allowed to happen if the RC is not an integer.
Pascal wouldn't allow non-integers, C mayhap would - python might be somewhere in between.
This User Gave Thanks to RudiC For This Post:
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am using Red Hat Linux on my servers. The problem that I am facing is, sometimes the /opt usage on the server shows used percentage as 100% , when actually it is simply 20%.
When I reboot the system, it comes back to 20%.Is this a bug in the system or my settings have gone wrong... (1 Reply)
Discussion started by: nua7
1 Replies
2. AIX
xxxxserver# lsattr -El inet0 | grep 255.240.0.0,32.224.0.0,32.78.120.254 | grep '.40'
route net,-hopcount,1,-netmask,255.240.0.0,32.224.0.0,32.78.120.254
How this is possible? (1 Reply)
Discussion started by: itik
1 Replies
3. UNIX for Dummies Questions & Answers
#!/bin/bash
if then
#echo "infinite loop"
exit 0
fi
when I run this file I get the following error:
./test_infinite_loop: line 5: syntax error near unexpected token `fi'
./test_infinite_loop: line 5: `fi'
:confused: (4 Replies)
Discussion started by: jon80
4 Replies
4. SuSE
Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here.
I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies
5. Shell Programming and Scripting
I am working on requirement on spreadsheet in python scripting.
I have a spreadsheet containing cell values and with background color.
I am able to read the value value but unable to get the background color of that particular cell.
Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies
6. Programming
(Apologies for any typos.)
OSX 10.12.3 AND Windows 10.
This is for the serious Python experts on at least 3.5.x and above...
In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly.
Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
7. Windows & DOS: Issues & Discussions
Hi all,
I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine..
Below is the code I am trying:
#!/usr/bin/env python
import wmi
c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies
8. Programming
Hi all...
As you know I like making code backwards compatible for as many platforms as possible.
This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
LEARN ABOUT CENTOS
snapconv
snapconv(1) Emulators snapconv(1)
NAME
snapconv - Sinclair ZX Spectrum snapshot converter
SYNOPSIS
snapconv [ -c ] [ -n ] infile outfile
DESCRIPTION
snapconv converts between ZX Spectrum snapshot files.
OPTIONS
-c specifies that all data in the output snapshot should be compressed, even if that compression will result in a bigger file than if
some data is left uncompressed. This helps compatibility with some buggy programs that can only read entirely compressed .z80 files.
-n specifies that the output snapshot should be uncompressed.
-f specifies that the A and F and A' and F' registers should be swapped. Version 0.5.0 and older of libspectrum(3) had a bug that
resulted in these registers being swapped in SZX snapshots only. Version 0.5.1 and newer of libspectrum(3) automatically recognise
these snapshots and correct the problem, but this flag is necessary to fix some snapshots created by development versions only of
libspectrum(3) which had the bug fixed, but cannot be distinguished from snapshots containing the bug.
infile specifies the snapshot to be converted. This file can be in any of the snapshot formats supported by libspectrum(3).
outfile
specifies the output snapshot. The format will be determined by the file extension and can be in any of the formats libspectrum(3)
supports for output.
BUGS
None known.
SEE ALSO
fuse(1), fuse-utils(1), libspectrum(3), listbasic(1), snap2tzx(1)
The comp.sys.sinclair Spectrum FAQ, at
http://www.worldofspectrum.org/faq/index.html.
AUTHOR
Philip Kendall (philip-fuse@shadowmagic.org.uk).
Version 1.0.0 16th December, 2010 snapconv(1)