Sponsored Content
Full Discussion: Is this a Python 3.x.x bug?
Top Forums Programming Is this a Python 3.x.x bug? Post 302998851 by wisecracker on Thursday 8th of June 2017 04:20:35 PM
Old 06-08-2017
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?
Awk's exit is a statement and Python's is a function.

Maybe it is just me but this should never be allowed to happen if the RC is not an integer. BTW thanks for the Ctrl-D heads up, I had forgotten all about that, however 'ls -l' is still executed.

Hi Corona688...
It was this, it always needs a redirection to a file for it to work however, so nothing like the other two and technically MUCH safer:-
Code:
Last login: Thu Jun  8 21:10:58 on ttys000
AMIGA:amiga~> exit 10 $( ls -l /tmp/ > /tmp/text )
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Last login: Thu Jun  8 21:11:40 on ttys000
AMIGA:amiga~> cat /tmp/text
total 0
drwx------  3 amiga  wheel  102  8 Jun 18:27 com.apple.launchd.QBBc1cRjqo
drwx------  3 amiga  wheel  102  8 Jun 18:27 com.apple.launchd.iC1FUcCphs
-rw-r--r--  1 amiga  wheel    0  8 Jun 21:12 text
AMIGA:amiga~> _

And yes, I know why the 'text' file_length reads zero, 0.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is it a bug ..?

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

bug in 43 ???

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

where's the bug?

#!/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

"ssh suse-server 'python -V' > python-version.out" not redirecting

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

**python** unable to read the background color in python

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

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(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

How to execute python script on remote with python way..?

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

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

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
DISSY(1)						      General Commands Manual							  DISSY(1)

NAME
dissy - graphical frontend for objdump DESCRIPTION
Dissy is a disassembler for Linux and UNIX which supports multiple architectures and allows easy navigation through the code. Dissy is implemented in Python and uses objdump for disassembling files. Dissy can be used for debugging, reverse engineering and checking compiler- generated code. -t BASE_ADDRESS Use BASE_ADDRESS as the start address of the disassembled code -h Display usage Features and usage * Dissy shows jumps with red links to the destination address * A label is used to show call destinations * Clicking (or pressing enter) on calls or jumps will take you to the destination function / address * Dissy supports interactive searching for labels and addresses both for functions and instructions * Browser-like history navigation (back/forward) is available, which is useful for example to lookup callchains. Alt-Left and Alt-Right are used to navigate back and forward * The lookup (use Ctrl-l to access) feature allows for looking up pasted addresses or labels. The lookup is intelligent in that it tries to convert common patterns into numbers before reverting to label lookup. Pasting multiple addresses or names will lookup each in turn and stop at the last (access the earlier in the history) * The highlight field (ues Ctrl-k to access) allows the disassembled text to be highlighted for example to show all accesses to a certain register. Regular expressions are allowed in this field * The preferences window can be used to select which objdump to use (which can also be controlled by the OBJDUMP environment variable). Colors can also be selected in this window. HOMEPAGE
http://rtlab.tekproj.bth.se/wiki/index.php/Dissy AUTHOR
This manual page was written by Varun Hiremath <varunhiremath@gmail.com>, for the Debian project (but may be used by others). October 20, 2006 DISSY(1)
All times are GMT -4. The time now is 02:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy