Skip to main content

RM Nimbus GUI for Python

Project description

Nimbusinator

RM Nimbus GUI for Python

About

Nimbusinator is a graphical user-interface package for Python that mimicks the graphics and text drivers of the RM Nimbus PC186. It is not an emulation of the Nimbus itself. This means you get the best of both worlds: Cutting-edge Python computing power, beautifully presented in up to 16 colours!

Read the docs for full details

Usage

To implement a Nimbus user interface all you need to do is import the Nimbus and Command classes, like this:

from nimbusinator import Nimbus, Command

Then create one object of each, and bind the Command object to the Nimbus object:

nim = Nimbus()
cmd = Command(nim)

To display the screen, call the boot method on the Nimbus object. By default, you'll see the famous blue "Welcome Screen" before control is released back to your program. To skip the Welcome Screen simply pass the argument skip_welcome_screen=True when calling boot, like this:

# Boot the Nimbus with Welcome Screen
nim.boot()
# Boot the Nimbus without Welcome Screen  
nim.boot(skip_welcome_screen=True)

Note that the original Welcome Screen reported the memory status of the computer (in kilobytes!), alongside the RM firmware version and machine serial number. Nimbusinator also displays memory status (but in units of Megabytes) and uses your Python version as the firmware version and your OS release number as the serial number. It also uses information from your runtime environment to simulate a short DOS-like boot sequence before finally releasing control back to your application. All the while you can enjoy the dulcet tones of an imaginary floppy drive.

To bring the Nimbus programming experience into the 21st century, the API - although Pythonic - has been modelled on the syntax of RM Basic. For example, in RM Basic to write a greeting in big, red letters in the bottom-left corner of the screen you would use the PLOT command:

PLOT "Hi kittens!", 10, 10 BRUSH 2 SIZE 4

And in Python with Nimbusinator you can write the same instruction like this:

cmd.plot('Hi kittens!', (10, 10), brush=2, size=4)

It is recommended to read the RM Basic manual to get familiar with the original commands and how graphics and text were handled on the Nimbus (see links below).

To cleanly exit your application, call the shutdown method on the Nimbus object:

# Always do this before your app quits:
nim.shutdown()

Supported Operating systems

  • Linux

Installation

# In case you don't already have it:
sudo apt-get install -y python3-dev libasound2-dev

# Otherwise go straight to:
pip install nimbusinator

Quick-start

from nimbusinator import Nimbus, Command

if __name__ == '__main__': 
    # Create and bind nimbusinator objects:
    nim = Nimbus()
    cmd = Command(nim)
    nim.boot()          # Boot the Nimbus
    cmd.set_mode(40)    # Low resolution mode
    cmd.set_border(1)   # Dark blue border
    cmd.set_paper(9)    # Light blue paper
    cmd.cls()           # Clear screen
    cmd.plonk_logo((10, 120))    # Show Nimbus logo
    # Display a message in cyan with shadowing
    cmd.plot('Greetings from', (30, 155), size=2, brush=0)
    cmd.plot('Greetings from', (31, 156), size=2, brush=13)
    cmd.plot('(not really)', (110, 80), brush=14)
    # Wait 5 seconds then shutdown
    nim.sleep(5)
    nim.shutdown()

Links

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

nimbusinator-0.0.1.tar.gz (537.9 kB view details)

Uploaded Source

Built Distribution

nimbusinator-0.0.1-py3-none-any.whl (538.7 kB view details)

Uploaded Python 3

File details

Details for the file nimbusinator-0.0.1.tar.gz.

File metadata

  • Download URL: nimbusinator-0.0.1.tar.gz
  • Upload date:
  • Size: 537.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7

File hashes

Hashes for nimbusinator-0.0.1.tar.gz
Algorithm Hash digest
SHA256 241fccc289ca67a63da4a39d83144368a64b4c354c28d10778d113768301b154
MD5 b1a998e9d5a2d1d503db550d71580093
BLAKE2b-256 fce48dcc519de70fe7e1e8bc96d7d07542dce58a4682ef3dd839276ebf0505df

See more details on using hashes here.

File details

Details for the file nimbusinator-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nimbusinator-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 538.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.7

File hashes

Hashes for nimbusinator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8fc55e64a11dc86dca1eeba389d70b863aae01adb44dfbd7b1578cef6c41ea4
MD5 a57fc5608266175d015b935585e6e1ae
BLAKE2b-256 06e0f87b98f3210e53c5a25b19377aa699f733277206cca0f08bb715d779f6f0

See more details on using hashes here.

Supported by

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