Popular recipes tagged "amiga"http://code.activestate.com/recipes/tags/amiga/2017-01-20T22:17:23-08:00ActiveState Code RecipesA pseudo-echo, (or printf), function for any Python version. (Python)
2017-01-20T22:17:23-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580750-a-pseudo-echo-or-printf-function-for-any-python-ve/
<p style="color: grey">
Python
recipe 580750
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/echo/">echo</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/printf/">printf</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>A simple example of having a pseudo-echo using sys.stdout.write...</p>
<p>This gives exactly the same results from Python Versions, 1.4.0, 2.0.1, 2.5.6, 2.6.9, 3.4.3 and 3.5.2 on various platforms including the classic AMIGA A1200.</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza.</p>
A simple raw hexdumper. (Python)
2016-09-19T13:24:37-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580697-a-simple-raw-hexdumper/
<p style="color: grey">
Python
recipe 580697
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/hexdump/">hexdump</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/raw_hexdump/">raw_hexdump</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This is not a hexreader. This code creates a raw hexdump of a binary file that is whitespace, optional, delimited. The dump is saved into the current directory with a ".hex" extension.</p>
<p>It works on just about any current platform but is designed around a stock Amiga A1200(HD) with Python 1.4.0. It also works on the current stable version 3.5.2.</p>
<p>I needed a hexdump some years ago for banging the Amiga hardware, and decided to modify recently for another usage but it had to still work on version 1.4.0 for the classic A1200.</p>
<p>Enjoy...</p>
A Function To Create A 1 Second Sinewave WAVE Beep File. (Python)
2014-11-23T19:24:46-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578971-a-function-to-create-a-1-second-sinewave-wave-beep/
<p style="color: grey">
Python
recipe 578971
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/beep/">beep</a>, <a href="/recipes/tags/error_beep/">error_beep</a>, <a href="/recipes/tags/error_sound/">error_sound</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/sinewave/">sinewave</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/wav/">wav</a>, <a href="/recipes/tags/wave/">wave</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>sinebeep.py</p>
<p>Creating an audio file called...</p>
<p>beep.wav</p>
<p>...that can be played using almost ANY audio player available.</p>
<p>This simple snippet of code generates a 1 second sinewave WAVE file.
It IS saved inside the CURRENT drawer so that you can find it... ;o)</p>
<p>This works on:-
Classic stock AMIGA A1200, using Python 1.4.0.
WinUAE and E-UAE, AmigaOS 3.0.x using Python 1.4.0 to 2.0.1.
Windows, to at least 7, using Python 2.0.1 to 3.3.2.
Various Linux flavours using Python 2.4.6 to 3.2.2.
Apple OSX 10.7.x and above using Python 2.5.6 to 3.4.1.</p>
<p>The file size is 8044 bytes and _IF_ you need to it can be palyed directly
without a player on some Linux flavours that have the /dev/dsp device.
It is an 8 bit, unsigned integer, mono, 8000Hz sampling speed 8000 byte
RAW file with the WAVE header added.</p>
<p>It will still work with PulseAudio and OSS using...</p>
<p>cat /full/path/to/beep.wav > /dev/dsp</p>
<p>...but with a momenatry click due to the 44 header bytes; but hey it is
a beep alternative...</p>
<p>Enjoy finding simple solutions to often very difficult problems.</p>
<p>Bazza.</p>
A Simple Clock, Well Maybe Not That Simple... (Python)
2013-08-09T18:15:09-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578633-a-simple-clock-well-maybe-not-that-simple/
<p style="color: grey">
Python
recipe 578633
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/big/">big</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/digits/">digits</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/time/">time</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>BIG_TIME.py</p>
<p>Remember this?</p>
<p><a href="http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/" rel="nofollow">http://code.activestate.com/recipes/578610-a-simple-clock-well-maybe-not-that-simple/</a></p>
<p>And this?</p>
<p><a href="http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147" rel="nofollow">http://code.activestate.com/recipes/578079-pure-fun-for-text-mode-python/?in=user-4177147</a></p>
<p>Well the Python version of the top URL has been uploaded to AMINET on 01-08-2013...</p>
<p>Now the big gun that complained about my fun Python upload and voted it down can see
that this was a serious attempt ae viewing "Hello World!" in extra large xharacters.</p>
<p>This is the result in Python...</p>
<p>It is ONLY uploaded to AMINET and that is where it will stay.</p>
<p>If you want it then use the pointer inside code section.</p>
<p>Remember to change the BIG_TIME.py.txt file on AMINET to BIG_TIME.py...</p>
<p>Designed around a Macbook Pro OSX 10.7.5 for the Classic AMIGA platforms and works
on Debian 6.0.x and PCLiuxOS 2009 using Python versions 1.4.0 to 3.3.2 inclusive...</p>
<p>Although the description in the AMINET readme below is for an AMIGA environment it does
not take a genius to adapt it to the other platforms...</p>
<p>Boy was this difficult to get working in a single Python script...</p>
<p>ENJOY...</p>
<p>This is the AMINET readme file:-</p>
<p>Short: A Big Digital Clock Python Script.
Author: <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a> (Barry Walker)
Uploader: <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a> (Barry Walker)
Type: dev/src
Version: 1.00.00
Architecture: generic; m68k-amigaos</p>
<p>Distribution: Public Domain, Emailware.</p>
<p>============================================================================</p>
<h5 id="architectures-classic-amigas-e-uae-and-winuae">Architectures: Classic AMIGAs, E-UAE and WinUAE.</h5>
<p>MINIMUM Requirements Are:-</p>
<hr />
<pre class="prettyprint"><code> 68EC020 CPU and 2MB RAM total, example, a standard A1200(HD).
WinUAE Version 1.5.3 minimum.
Standard OS3.0x install or better.
Python Version 1.4.0 or higher.
(Also, OSX 10.7.5, Debian Linux 6.0.x and PCLinuxOS 2009.)
</code></pre>
<hr />
<h5 id="history">History.</h5>
<p>01-08-2013.
Version 1.00.00:- Original upload to AMINET...</p>
<p>This is dedicated entirely to the AMIGA community and AMINET and will not
be uploaded elsewhere.</p>
<hr />
<p>To install just download the "BIG_TIME.py.txt" file and rename it to
"BIG_TIME.py" without the quotes. Drag this file into your AMIGA PYTHON:
volume and...</p>
<p>From a minimum of Python Version 1.4.0 prompt:-</p>
<pre class="prettyprint"><code>>>> exec(open("PYTHON:BIG_TIME.py").read())<CR>
</code></pre>
<p>And away you go...</p>
<p>This code is/was designed to work in all versions of Python from 1.4.0
to 3.3.2 on at least the platforms shown in the Architectures: section.</p>
<p>It was developed entirely on a Macbook Pro OSX 10.7.5 and finalised using
MEmacs for the AMIGA.</p>
<hr />
<p>This is just a simple DEMO to show how to generate large digits in Python
and put them to use as an _AT_A_GLANCE_ digital clock.</p>
<p>It starts up by generating all of the characters available for the DEMO
for five seconds then goes into the clock proper.</p>
<p>As this code is multi platform AND multi Python version then it is issued
as GPL2...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<hr />
<pre class="prettyprint"><code> IMPORTANT:-
-----------
The Legal Stuff:-
-----------------
This Python script is issued under the GPL2 licence conditions.
The author is not responsible for any damage to, or loss of, or
failure of equipment or data caused in any way by the use of this
script. There is NO warranty with the use of this software release
and YOU USE IT AT YOUR OWN RISK.
</code></pre>
<hr />
<pre class="prettyprint"><code>Testing Evaluation:-
--------------------
All WinUAE, E-UAE and Classic AMIGA test conditions were/are running
standard OS3.0x/OS3.1x and using standard ~topaz 8~ fonts throughout.
I have no idea what strange configuration setups will create so refer
to the ~The Legal Stuff~ above.
</code></pre>
<hr />
<p>Contact:-</p>
<hr />
<p>Mr Barry Walker, G0LCU.</p>
<p>Email:- <a href="mailto:wisecracker@tesco.net">wisecracker@tesco.net</a></p>
<p>Author of the ~TestGear?~ projects in the ~docs/hard~ drawer of AMINET.</p>
<hr />
<p>A very useful HardWare related site, (C) Anthony Hoffman, for
modifications, schematics, repairs and the like is:-</p>
<pre class="prettyprint"><code> <a href="http://amiga.serveftp.net/">http://amiga.serveftp.net/</a>
</code></pre>
<p>============================================================================</p>
Position The Cursor Almost Anywhere Inside Standard Text Mode Python Terminal. (Python)
2012-06-17T17:10:29-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578167-position-the-cursor-almost-anywhere-inside-standar/
<p style="color: grey">
Python
recipe 578167
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/locate/">locate</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>A DEMO showing the power of the ANSI (ASCII) _Esc_ codes in standard text mode Python.</p>
<p>ANSI _Esc_ codes here:- <a href="http://www.termsys.demon.co.uk/vtansi.htm" rel="nofollow">http://www.termsys.demon.co.uk/vtansi.htm</a></p>
<p>There are only three important things from the ANSI _Esc_ codes that are needed to obtain a neat finish to a program written in standard text mode Python:-</p>
<p>1) Clearing the screen. (Already done without the dedicated ANSI _Esc_ code!)</p>
<p>2) Colours and other character attributes. (Already done!)</p>
<p>3) A forced printing of a character or string from a given location inside the Terminal window.</p>
<p>To clear the screen does NOT require another dedicated ANSI _Esc_ code, (although it exists). This code uses the print("\r\n") method which works in all cases coupled with the one function supplied......</p>
<p>For The Classic AMIGA, E-UAE, WinUAE and Linux using Python(s) 1.4.0 to Python 3.2.2. Read the code for more information...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU.</p>
For AMIGA-Heads Only. Poking A HW, (Memory), Address On A Classic AMIGA, Inside Text Mode Python. (Python)
2012-09-09T19:25:00-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578255-for-amiga-heads-only-poking-a-hw-memory-address-on/
<p style="color: grey">
Python
recipe 578255
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/hardware/">hardware</a>, <a href="/recipes/tags/memory/">memory</a>, <a href="/recipes/tags/poke/">poke</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>For AMIGA-Heads Only...</p>
<p>This code is purely for a minimum of a stock Classic AMIGA A1200(HD), E-UAE, and WinUAE running AMIGA OS3.0x to 3.1x.
It will NOT work on any other platform!</p>
<p>(It MIGHT work on AMIGA OS3.5x and 3.9x with Python 2.4.6, but totally untested and I hold no responsibility for the outcome when trying it.)</p>
<p>It is a DEMO to poke a byte inside _ANY_ memory address inside the standard CPU 68EC020 16MB boundary.</p>
<p>This is not a function nor a class but just a DEMO to show how to write directly to HW, (or memory), addresses.</p>
<p>POKING memory or hardware addresses is not recommended for novices without studying the machine first, and, this code will ignore any _ENFORCER_hits_.</p>
<p>I experimented with this several years ago and have decided to finally release it. I do await the flak!</p>
<p>It works from Python Versions 1.4.0 to 2.0.1 for the classic AMIGA.</p>
<p>This is issued as Public Domain and you may do with it as you please.</p>
<p>Ensure that the T: Volume exists on the running machine.</p>
<p>See inside the code and text below it also as to how it works...</p>
<p>Bazza, G0LCU...</p>
For AMIGA-Heads Only. Peeking A Memory Address On A Classic AMIGA, Inside Text Mode Python. (Python)
2012-07-03T17:00:20-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578189-for-amiga-heads-only-peeking-a-memory-address-on-a/
<p style="color: grey">
Python
recipe 578189
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/peek/">peek</a>, <a href="/recipes/tags/peeking/">peeking</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>For AMIGA-Heads Only...</p>
<p>This code is purely for a minimum of a stock Classic AMIGA A1200(HD), E-UAE, and WinUAE running AMIGA OS3.0x to 3.1x. It will NOT work on any other platform!</p>
<p>(It MIGHT work on AMIGA OS3.5x and 3.9x with Python 2.4.6, but totally untested and I hold no responsibility for the outcome when trying it.)</p>
<p>It is a DEMO to peek a byte inside _ANY_ memory address inside the standard CPU 68EC020 16MB boundary.</p>
<p>I experimented with this several years ago and have decided to finally release it. I do await the flak!</p>
<p>It works from Python Versions 1.4.0 to 2.0.1 for the classic AMIGA.</p>
<p>Ensure that the T: Volume exists on the running machine.</p>
<p>See inside the code and text below it also as to how it works...</p>
<p>Bazza, G0LCU...</p>
Forwards Compatibility; Generating A Function On The Fly... (Python)
2012-06-06T17:16:27-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578160-forwards-compatibility-generating-a-function-on-th/
<p style="color: grey">
Python
recipe 578160
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This code auto-generates a function that converts a string to bytes only in Python Versions 3.x.x.
The function will NOT be generated in Python Versions 1.4.0 to 2.7.x. See the code for all the versions
tested on. Inside the code are commented-out lines to show a practical usage for this and WILL be used
in future /dev/audio or /dev/dsp access that I may develop...</p>
<p>See the notes right at the bottom and read all the notes inside the code...</p>
<p>This is NOT Public Domain like all my other stuff but is MIT licenced...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU...</p>
Colo(u)rs Inside Text Mode Python... (Python)
2012-08-21T21:01:57-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578101-colours-inside-text-mode-python/
<p style="color: grey">
Python
recipe 578101
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/colour/">colour</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
Revision 2.
</p>
<p>A simple DEMO to show how to enhance Python inside a Terminal. This works on Classic AMIGAs, E-UAE,
Debian Linux 6.0.0, PCLinuxOS 2009, Windows XP and Vista and WinUAE, from Python 1.4.0 to 3.3A2.</p>
<p>Due to a complaint about my _fun_ upload recently I decided to post this so that the MANY can now
find out how to manipulate text inside a Python Terminal window so that it looks much better.</p>
<p>Read the code for more information...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza...</p>
For AMIGA-Heads Only. Generating An Audio Signal In Text Mode Python. (Python)
2011-11-30T21:23:20-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577971-for-amiga-heads-only-generating-an-audio-signal-in/
<p style="color: grey">
Python
recipe 577971
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This DEMO is not for the big guns. It is aimed at those who still use
a minimum of an ancient classic AMIGA A1200(HD), E-UAE, WinUAE, of which
there are still a lot of us about...</p>
<p>No comments about the use of "eval()" as Python Version 1.4.0 does not
have "int()" and this is designed to work on all versions of Python
available for the above platform. See the code for minimum requirements
and much more information.</p>
<p>MANY THANKS to Irmen de Jong for porting early versions of Python to
the classic AMIGA to give we lowly users a taste of what was/is to come.</p>
<p>This code will probably make the professionals cough a little, but, boy
what fun it is to see how powerful Python can be on an open platform
like the AMIGA.</p>
<p>Written in such a way that anyone can understand how it works...</p>
<p>I really don't care how you vote this as it is for those, including
professionals, who enjoy messing with AMIGA variants purely for fun and
relaxation, and, to......</p>
<p>Enjoy finding simple solutions to often VERY difficult problems... ;o)</p>
<p>Bazza, G0LCU...</p>
"execfile()" IS BACK! Backwards Compatibility part 5... (Python)
2011-11-04T18:17:48-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577942-execfile-is-back-backwards-compatibility-part-5/
<p style="color: grey">
Python
recipe 577942
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/all_versions/">all_versions</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/backwards_compatibility/">backwards_compatibility</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>"execfile()" IS BACK!!!</p>
<p>Some example lines to add to any test code you write that work from Python (1.4.0), 2.0.1 to 3.2.2
on various platforms.</p>
<p>It is all Public Domain and you can do with it as you please...</p>
<p>I really don't care how you vote and/or rate this as I try to write Python code for my
usage to work on the platforms and versions inside the code.</p>
<p>These are a little tongue in cheek so don't take them too seriously.</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>(Watch out for wordwrapping, etc...)</p>
<p>This will probably be the last one of these uploads as the last one did not "take off".</p>
<p>Bazza, G0LCU...</p>
Remove the real "input()" function from a current text mode Python 1.4.0 to 2.7.2 session... (Python)
2011-10-13T19:04:45-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577906-remove-the-real-input-function-from-a-current-text/
<p style="color: grey">
Python
recipe 577906
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>The single very powerful line of just the fifteen ASCII characters says it all...</p>
<p>Read the code for more information...</p>
<p>Tested on the platforms and versions inside the code...</p>
<p>This is entirely Public Domain and hopefully it will be of use to many a Python coder...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU...</p>
Backwards Compatibility part 4... (Python)
2011-10-10T19:39:54-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577903-backwards-compatibility-part-4/
<p style="color: grey">
Python
recipe 577903
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/all_versions/">all_versions</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/backwards_compatibility/">backwards_compatibility</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>Some example lines to add to any test code you write that work from Python 1.4.0 to 3.2.2
on various platforms.</p>
<p>It is all Public Domain and you can do with it as you please...</p>
<p>I really don't care how you vote and/or rate this as I try to write Python code for my
usage to work on the platforms and versions inside the code.</p>
<p>Some people will know this but very MANY won't and there will be more to come that involve
platform and version compatibility...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>(Watch out for word wrapping, etc...)</p>
<p>Bazza, G0LCU...</p>
"raw_input" For All Versions Of Python... (Python)
2011-08-10T16:52:04-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577836-raw_input-for-all-versions-of-python/
<p style="color: grey">
Python
recipe 577836
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>The code says it all... ;o)</p>
<p>Put the two lines in any Python code and have universal KB input...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU...</p>
Backwards Compatibility part 3... (Python)
2011-09-29T21:48:24-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577884-backwards-compatibility-part-3/
<p style="color: grey">
Python
recipe 577884
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/all_versions/">all_versions</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/backwards_compatibility/">backwards_compatibility</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>Some example lines to add to any test code you write that work from Python 1.4.0 to 3.2.2 on various platforms.</p>
<p>It is all Public Domain and you can do with it as you please...</p>
<p>I really don't care how you vote and/or rate this as I try to write Python code for my usage to work on the platforms and versions inside the code.</p>
<p>Some people will know this but MANY won't and there will be more to come that involve platform and version compatibility...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>(Watch out for wordwrapping, etc...)</p>
<p>Bazza, G0LCU...</p>
Bacwards compatibility part 2... (Python)
2011-09-19T10:01:56-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577872-bacwards-compatibility-part-2/
<p style="color: grey">
Python
recipe 577872
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/all_versions/">all_versions</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/backwards_compatibility/">backwards_compatibility</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>Some example lines to add to any test code you write that work from Python 1.4.0 to 3.2.2 on various platforms.</p>
<p>It is all Public Domain and you can do with it as you please...</p>
<p>I really don't care how you vote and/or rate this as I try to write Python code for my usage to work on the platforms and versions inside the code.</p>
<p>Some people will know this but MANY won't and there will be more to come that involve platform and version compatibility...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>(Watch out for wordwrapping, etc...)</p>
<p>Bazza, G0LCU...</p>
Backwards compatibility... (Python)
2011-09-16T18:36:14-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577868-backwards-compatibility/
<p style="color: grey">
Python
recipe 577868
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/all_versions/">all_versions</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/backwards_compatibility/">backwards_compatibility</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>Some example lines to add to any test code you write that work from Python 1.4.0 to 3.2.2 on various platforms.
It is all Public Domain and you can do with it as you please...</p>
<p>This is to go alongside this little snippet...
<a href="http://code.activestate.com/recipes/577836-raw_input-for-all-versions-of-python/?in=lang-python" rel="nofollow">http://code.activestate.com/recipes/577836-raw_input-for-all-versions-of-python/?in=lang-python</a></p>
<p>I really don't care how you vote and/or rate this as I try to write Python code for my usage
to work on the platforms and versions inside the code.</p>
<p>Some people will know this but MANY won't and there will be more to come that involve platform
and version compatibility...</p>
<p>Enjoy finding simple solutions to often VERY difficult problems...</p>
<p>(Watch out for wordwrapping, etc...)</p>
<p>Bazza, G0LCU...</p>
Kids Level Analogue Data Logger, (Transient Recorder), Program. (Python)
2011-07-31T16:14:48-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577796-kids-level-analogue-data-logger-transient-recorder/
<p style="color: grey">
Python
recipe 577796
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/analogue/">analogue</a>, <a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/logger/">logger</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
Revision 2.
</p>
<p>This code is kids level Analogue Data-Logger(/Transient-Recorder), using the Arduino series of dev' boards.</p>
<p>It is no where near completion and is a second feeder/feeler upload only.</p>
<p>It is designed to work from Classic Text Mode Python from Versions 1.4.0 to 2.7.2 on a Classic AMIGA, WinUAE, Linux and Windows, (32 bit), to Vista.
Not tested on Python for Windows 7, (32 bit), nor Mac OSX flavours as I don't have these OSes.</p>
<p>Linux versions run from a default root terminal for the time being.</p>
<p>The Arduino dev' board IS catered for in the code for the above platforms just thoroughly read the code for more information. It defaults to a DEMO mode so you can see it working...</p>
<p>The test code for the Arduino Diecimila Dev Board is here:-</p>
<p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/</a></p>
<p>Enjoy finding simple solutions to often very difficult problems... ;o)</p>
<p>Bazza, G0LCU...</p>
For AMIGA-Heads Only. PAR: As A VOLUME In READ Mode Only. (Python)
2011-06-12T16:34:12-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577750-for-amiga-heads-only-par-as-a-volume-in-read-mode-/
<p style="color: grey">
Python
recipe 577750
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/parallel/">parallel</a>, <a href="/recipes/tags/parallel_port/">parallel_port</a>, <a href="/recipes/tags/port/">port</a>, <a href="/recipes/tags/read/">read</a>).
</p>
<p>PAR: as a VOLUME in READ mode using Python 1.4 onwards on Classic AMIGAs...</p>
<p>Many years ago Irmen de Jong ported Python to the Classic AMIGA range of
computers, (many thanks Irmen for your time in doing so). The versions were
at least 1.4.x to 2.0.1 and now someone else has included version 2.4.6.</p>
<p>This gives we lowly users of the AMIGA at least a chance to see and use
Python in some guise or another. This code shows how to access the AMIGA
parallel port for 8 bit READ only. This is so that ADCs could be attached to
the port, read by Python code EASILY and utilised as a Data Logger/Transient
Recorder, as just one example.</p>
<p>There needs to be a single HW WIRE link only from the 23 way video port
to the 25 way parallel port for this to work. See the archive......</p>
<p><a href="http://aminet.net/package/docs/hard/PAR_READ" rel="nofollow">http://aminet.net/package/docs/hard/PAR_READ</a></p>
<p>......on how to set about this extremely simple task.</p>
<p>NO knowledge of the parallel port programming is needed at all to grab 8 bit
data from it using Python and other languages; (ARexx is used in the archive
above).</p>
<p>There is a flaw, NOTE:- NOT A BUG!, in the Python code but for this DEMO it
is ignored. ;o)</p>
<p>I'll let all you big guns work out what it is; you will need a good working
knowledge of the Classic AMIGA.</p>
<p>Enjoy finding simple solutions to often very difficult problems. ;o)</p>
<p>This code is Public Domain and you may do with it as you please.</p>
<p>Bazza...</p>
Clear screen and beep for various platforms. (Python)
2011-02-26T14:26:02-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577588-clear-screen-and-beep-for-various-platforms/
<p style="color: grey">
Python
recipe 577588
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/beep/">beep</a>, <a href="/recipes/tags/clearscreen/">clearscreen</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/error_beep/">error_beep</a>, <a href="/recipes/tags/error_sound/">error_sound</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/screenclear/">screenclear</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This little module gives a clear screen and beep for the classic AMIGA, WinUAE, Windows and Linux all in
CLI/Command-Prompt/Terminal mode.</p>
<p>It works from Python 1.4.x to 2.7.x; talk about backwards compatibility... ;oD
With very little modification it will work on Python 3.x.x easily.)</p>
<p>See the file clsbeep.py attached for more information.</p>
<p>it is saved as clsbeep.py and placed into the Python - Lib drawer or where-ever the modules are located
and called as a module:-</p>
<pre class="prettyprint"><code>>>> import clsbeep
</code></pre>
<p>Its usage is:-</p>
<p>clsbeep.cls() and clears the screen.
clsbeep.beep() and creates an error beep.
clsbeep.both() creates an error beep first then clears the screen.</p>
<p>It is Public Domain and if you modify it to suit other platforms please let me have a copy of your code... :)</p>
<p>Enjoy finding simple solutions to often very difficult problems. ;o)</p>