Skip to main content

Simple Minitel interface in Python

Project description

MiniMinitel

MiniMinitel is a simple Minitel interface in python. It has been created with the help of :

MiniMinitel is now live on PyPi !

from miniminitel import MiniMinitel

with MiniMinitel("COM4") as minitel:
    minitel.clear()
    
    minitel.cursor_move_to(4, 4)
    minitel.write_double_grandeur("Hello world")

    minitel.write_at(6, 6, "I'm a MiniMinitel")
    minitel.set_blinking()
    minitel.write_at(6, 7, "And I look cool")
    minitel.set_non_blinking()

Use .start_listening to handle input. This example script will listen for input and echo them. Special key, such as ENVOI, RETOUR, ANNULATION will be logged in Python's terminal.

from miniminitel import MiniMinitel, MinitelInput, MinitelCode

def echo(value: MinitelInput):
    if value.code == MinitelCode.TEXT:
        minitel.write(value.text)
    else:
        print("Key pressed : " + value.code)

with MiniMinitel() as minitel:
    minitel.clear()
    # Press Fnct + T then E to remove Minitel echo
    # (or else key pressed will be echoed twice, by the Minitel and by this script)
    minitel.start_listening(echo)

Setup

Python

Library is written with Python 3.10, no support for other version are guaranteed (should be compatible Python 3.11+)

pip install miniminitel

Minitel

Minitel need to be pluggged to computer throught serial port. Documentation need to be written

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniminitel-1.0.4.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniminitel-1.0.4-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file miniminitel-1.0.4.tar.gz.

File metadata

  • Download URL: miniminitel-1.0.4.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for miniminitel-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5d8c6610b0dbb9731d5c7a235a6a1cb8fe50ae1b194685a1d4538b3740431ad1
MD5 eba9b1b21e566196d6e69f1b1e3c5db3
BLAKE2b-256 16c29ac8d47e2db3289b13673fe8228973eabefaa8ad97d23c2ba02d19a756c2

See more details on using hashes here.

File details

Details for the file miniminitel-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: miniminitel-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for miniminitel-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83d9694994f97a76db6cd26ce90503c503aa35b0e6f769f6c7e71b37e8a4dc25
MD5 abfb240ffb12aa17df4bd59244d61999
BLAKE2b-256 2c4f5b37cf3bc259ce66955a6a928e00d92853469d688eb526700099cec1c73c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page