Popular recipes tagged "amiga" but not "demo" and "digits"http://code.activestate.com/recipes/tags/amiga-demo-digits/2016-09-19T13:24:37-07:00ActiveState Code RecipesA 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>
"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>
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>