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 on a stock A1200 only to expansions to 68060, FPU, MMU and serious memory for the day.
This is designed purely for my stock A1200 with HDD and 4MB of extra FastRam and Python 1.4.0, the only version that does not require MMU and FPU.
It requires ADE the *NIX emulator and gcc 2.95.3 to work and the result gives a simple calculator for ADE as bc, dc and others do not exist.
AND before anyone mentions the 'r' prefix on the 'docstring' variable = r""" Some raw text... """ , Pythons 1.4.0 to 1.6.x do NOT have that facility. So a basic docstring is required. Therefore ALL escaped text MUST have the escqpe escaped, for example, \n becomes \\n .
( @ Corona688, your awk DFT is now at 734 dls, Aminet - dev/gcc/DFT-FFT.awk.txt and I expect it to be over 1000 by the end of the year. )
It is not easy working out all the permutations and combinations of a language where each major version is near entirely different from its predecessor but this is the result, note my MBP booting into Linux Mint 19:
Results on Linux Mint 19, default bash terminal, Python 2.7.x, gcc 7.3.0.
So even though these Python versions are worlds apart, if the minimum is found between them all then everyone can share fully usable code for, now esoteric, platforms.
( Long live the AMIGA... <wink> )
EDIT:
Now tested on Python 3.6.7 and 3.7.1 on Linux Mint 19...
Last edited by wisecracker; 05-20-2019 at 01:38 PM..
Reason: See EDIT.
This User Gave Thanks to wisecracker For This Post:
Note that your four global variables (SOLUTION, FLOAT_1, FLOAT_2, and OPERATOR) are never referenced in your code because both of your subroutines (main() and calc()) have local variables with the same names.
If you get rid of the global variables, you should get exactly the same results from a binary that might be a few bytes smaller.
This User Gave Thanks to Don Cragun For This Post:
I have a list as follows:
From this i need to grep the element using keyword as "primary" and return output as
12:13-internet-wifi-primary
i used as follows
if (i <= (len(system_info))):
ss = system_info
print... (5 Replies)
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)
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Hi
I am trying to execute a sed command inside paramiko which finds and deletes the particular string from a file
But sed command doesnt work inside paramiko python
machine=qwe
dssh = paramiko.SSHClient()
dssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
... (4 Replies)
sinebeep.py
Creating an audio WAVE file called...
beep.wav
...that can be played using almost ANY audio player available.
This simple DEMO snippet of code generates a 1 second sinewave WAVE file. It IS saved inside the CURRENT drawer so that you can find it... ;o)
Note that the... (1 Reply)
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)
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)
Hello,
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
>>> import subprocess
>>> help(subprocess)
...
...
I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Hello everyone,
I' m currently working on an open source project and I'm looking for people willing to test the software on various platforms so that we'll be able to publish a compatibility list.
The project is called CorneliOS, it's a webOS and web application framework, and it has been... (0 Replies)