AminetAminet
Search:
85741 packages online
• About
• Recent
• Browse
• Search
• Upload
• Setup
• Services

dev/src/ESC_Sequences.zip

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric iconother icon
No screenshot available
Short:UNIX style escape codes for Python
Author: wisecracker.bazza at gmail.com (Barry_Walker, G0LCU)
Uploader:wisecracker bazza gmail com (Lincs Amiga Group, LAG)
Type:dev/src
Version:0.00.10
Architecture:m68k-amigaos; generic
Date:2026-10-22
Distribution:Aminet
Download:dev/src/ESC_Sequences.zip - View contents
Readme:dev/src/ESC_Sequences.readme
Downloads:218

=============================================================================

Architectures: Classic AMIGA A1200(HD), FS-UAE on OSX 10.15.x and Mint 22.3.
----------------------------------------------------------------------------

  MINIMUM Requirements Are:-
  --------------------------

  Amiga environment:-
  -------------------
    Classic STOCK AMIGA A1200(HD), default OS3.0x install.
    FS-UAE on Intel APPLE OSX 10.15.x and GNU/Linux Mint Cinnamon 22.3.
    Standard default AMIGA OS_3.0.x install, or better still a highly
    expanded AMIGA with extra RAM will speed things up considerably.
    Python Version 1.4.0 on Classic AMIGA A1200(HD) OS3.0x:-

               https://aminet.net/package/dev/lang/Python_14

    This version that requires no extra hardware at all:-
                           'python_020_ieee'

    Python Version 1.5.2 to 2.0.1 on '030+ highly expanded AMIGAs OS3.0x.
    AmigaMicropython340 on Classic AMIGA A1200(HD) OS3.0x.

            https://aminet.net/package/dev/misc/AmigaMicropython

    Also as a matter of interest these Python scripts also work inside the
    excellent ADE, the *NIX emulation, but the STOCK AMIGA A1200(HD) needs
    at least an extra 4MB of FastRAM to do so:-

                   https://aminet.net/package/dev/gcc/ADE

-----------------------------------------------------------------------------

  Other environments:-
  --------------------
    Any Python version from 2.x.x to 3.15.0rc3 on Intel APPLE OSX 10.15.7.
    Any Python Version from 1.3.0 to 3.12.x on GNU/LINUX MINT CINNAMON 22.3.

    It has NOT been tested on WinUAE emulation of the above, Windows, and
    WSL[-2], with a Python Version installed.
    It has NOT been tested on any 'M' series APPLE gear either.
    (CygWin has 'mintty' and it supports at least much of what is done here
    already as I have used it in the past.)

=============================================================================

  History:-
  ---------

  21-08-2026.
  -----------
  Version 0.00.10. As you can see from the first upload these terminal
                   escape sequences are not what you would expect, nothing
                   'escapes' when one has to make something work on any
                   platform AND Python version. Have fun with this next step.
                   ==========================================================
                   GENERAL section; added a Prefix Only function, 'po()', for
                   multiple prefix usage, INCLUDING the colours!
                   INTERMEDIATE section; added Extended Colours function to
                   obtain foreground colours 90 to 97, and background colours
                   100 to 107, used in many modern terminals.
                   ADVANCED section; added 24 bit colour functions 'fg24()'
                   foreground colours, and 'bg24()' background colours.
                   Also added a file 'graphics.py' to demonstrate and test
                   graphics mode inside many modern terminals.
                   'graphics.py' is added to demonstrate importing 'ESC' to
                   do the task.
                   There will be loads more to add over time.
                   (Added all the relevant tests as required now.)

  07-08-2026.
  -----------
  Version 0.00.01. Taster upload to see if people are interested.
                   The archive is (C)2026, Barry Walker, and issued as PD,
                   Creative Commons CC0 licence.
                   (140 DLs, so people are interested.)

=============================================================================

  General:-
  ---------

(Apologies for any typos, etc...)

A compilation of UNIX style 'xterm' terminal escape codes designed to run
inside Python of any version but biased towards the AMIGA A1200(HD)!

If you NEED to suppress the final newline inside any 'print' statement or
'print()' function in your code then read the Python Manual for your version,
I should not have to show you how to do that.
HOWEVER, there are five files to make life easier for you on AMINET.
Just go to AMINET and type in, without the quotes, inside the search box:-
"Backwards Compatibility" and 5 files show version 1.4.0 to 3.15.0rc3
similarities for 'print' AND 'print()'.
There are four _Gemini_ images of all the default AMIGA[-]Shell escape codes
in AMIGA format, and eventually most, if not all of these, will be
transferred to 'xterm' format.

-----------------------------------------------------------------------------

  !!! IMPORTANT !!!
  -----------------

If you have uploaded an earlier version of this archive then DELETE ANY
'ESC.pyc' and/or 'ESC.pyo' files that exist so that new current versions can
be created, either inside the'__pycache__ folder or the folder where 'ESC.py'
is. Also there WILL be a random terminal that will be unable to use some of
the more advanced escape sequences so be well aware.

-----------------------------------------------------------------------------

  !!! REMEMBER !!!
  ----------------

The Classic AMIGA does not have the luxuries of the current, (as of the
above date), Python Version 3.15.0rc3 and its massive (C)2026_Pytho[-]System,
so these recipes might help towards using what we have and inspiring others
to add to them. They can be anything, not just mathematics, (like my others).
The difficulty is learning and memorising _ALL_ of the differences between
Python Versions, (1.3.0), 1.4.0 to 3.15.0rc3; there are a great many, believe
me!
(Creating workarounds has become second nature to me nowadays.)

Although UNTESTED, non[-]Commodore AMIGA variants might work up to the
INTERMEDIATE level as the Python versions are up to MicroPython 3.4.0.
AROS even has the current 3.14.7 !!! WOW !!!, and 2.5.2 for other variants.

And finally, it's better to have something for a retro[-]computer that does
NOT have that facility, TO have it, than TO NOT have it at all, no matter
how fast the code may or may not be in use!

  !!! EXTRA NOTE !!!
  ------------------

The Python file can be either sourced OR import[ed].
I should not have to explain how to use it in either format.
The 'print' statement or 'print()' function is needed to call these escape
codes for them to work.
The test functions however do NOT need need the 'print' facility as they are
inside each test function.
Assuming 'ESC' has been imported as shown then they are called as:-

>>> import ESC
>>> ESC.<whatever>_test()<CR> and away you go.

Also as an alternative to 'print' and 'print()' there is.....

>>> import sys

.....which has, 'sys.stdout.write()', which has its own foibles over the
huge version range, should work well enough, BUT IT HAS NOT BEEN TESTED!

=============================================================================

                                IMPORTANT:-
                                -----------

    The Legal Stuff:-
    -----------------

    The authors are not responsible for any damage to, or loss of, or
    failure of equipment or data caused in any way by the use of this code.

    There is NO warranty with the use of this software release and
    YOU USE IT AT YOUR OWN RISK.

-----------------------------------------------------------------------------

    Testing Evaluation:-
    --------------------

    Classic STOCK AMIGA A1200(HD). 
    FS-UAE emulation of Classic AMIGA test conditions were/are running
    standard OS 3.0.x 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.

    The whole archive was centred around the AMIGA!
    APPLE OSX 10.15.x and MY Linux flavour were included to make the code as
    universal as possible without any modification at all.

=============================================================================

    Barry Walker, G0LCU.
    wisecracker.bazza@gmail.com

-----------------------------------------------------------------------------

    A place to visit, literally and URL wise:-
                    https://lincsamiga.org.uk/wordpress/

-----------------------------------------------------------------------------

    A very useful HardWare related site, (C) Anthony Hoffman, for
    modifications, schematics, repairs and the like is:-

                          http://amiga.serveftp.net/

=============================================================================



Contents of dev/src/ESC_Sequences.zip
Archive:  /home/aminet/aminet_root/doc/dev/src/ESC_Sequences.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 2026-10-21 21:15 00000000  ESC/
       0  Stored        0   0% 2026-10-18 12:52 00000000  ESC/AMIGA_Dedicated_Esc_Codes/
  109860  Defl:N   105133   4% 2026-10-06 11:46 c6fa6188  ESC/AMIGA_Dedicated_Esc_Codes/ESC_AMIGA1.png
   89399  Defl:N    85753   4% 2026-10-06 11:48 52296b63  ESC/AMIGA_Dedicated_Esc_Codes/ESC_AMIGA2.png
  102878  Defl:N    99641   3% 2026-10-06 11:50 13522a93  ESC/AMIGA_Dedicated_Esc_Codes/ESC_AMIGA3.png
   78311  Defl:N    74856   4% 2026-10-06 11:54 c2c96baa  ESC/AMIGA_Dedicated_Esc_Codes/ESC_AMIGA4.png
       0  Stored        0   0% 2026-10-21 21:14 00000000  ESC/Docs/
    8712  Defl:N     3285  62% 2026-10-21 21:14 8beb9bec  ESC/Docs/ESC_Sequences.readme
    4101  Defl:N     1766  57% 2026-10-21 19:27 f5b21139  ESC/Docs/Functions_Available_ATM.txt
    3608  Defl:N     1228  66% 2026-10-16 15:10 8f2378da  ESC/Docs/Prefix_for_pfb_function.txt
   15758  Defl:N     3996  75% 2026-10-18 14:34 2dbf7a6a  ESC/ESC.py
       0  Stored        0   0% 2026-10-19 21:32 00000000  ESC/Linux_Bits/
       0  Stored        0   0% 2026-10-18 12:05 00000000  ESC/Linux_Bits/DEMO_ONLY/
    4582  Defl:N     1299  72% 2026-10-08 20:14 c3968c0d  ESC/Linux_Bits/DEMO_ONLY/DEMO_ONLY.bash
      65  Stored       65   0% 2026-10-08 20:25 cd2e21a7  ESC/Linux_Bits/DEMO_ONLY/Run_Demo.py
       0  Stored        0   0% 2026-10-18 15:19 00000000  ESC/Pics/
   51419  Defl:N    46159  10% 2026-10-18 15:17 52f96986  ESC/Pics/ESC.po_test_AMIGA.png
  130770  Defl:N   127576   2% 2026-10-18 15:09 e90583fe  ESC/Pics/ESC.po_test_LIMUX.png
   37990  Defl:N    34317  10% 2026-10-07 13:45 9e809813  ESC/Pics/Graphics_Cursor_Colours_TB.png
   99677  Defl:N    95271   4% 2026-10-09 08:55 e0e1dd59  ESC/Pics/garphics_Python_130.png
   96699  Defl:N    92811   4% 2026-10-09 09:01 626f6bba  ESC/Pics/graphics_Python_3123.png
     115  Defl:N      107   7% 2026-10-19 11:42 b7648b15  ESC/__init__.py
       0  Stored        0   0% 2026-10-20 21:13 00000000  ESC/__pycache__/
     142  Defl:N      124  13% 2026-10-18 16:28 d74a003f  ESC/__pycache__/Dummy_File.txt
    1629  Defl:N      318  81% 2026-10-10 11:57 585ba61b  ESC/graphics.py
--------          -------  ---                            -------
  835715           773705   7%                            25 files
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>