Skip to main content

Interactive shell to manipulate Commodore files

Project description

This Python module provides an interactive shell to read and write files to disk image files (.d64, .d71, .d80, .d81, .d82) and tape image files (.t64, .tap) used by various Commodore microcomputer emulators and tools.

It permits moving files between images and the local file system as well as other actions such as directory listing and file deletion.

It provides many common benefits of a traditional UNIX shell including filename completion, command history and output redirection.

Quickstart Guide

The shell is started by running the cbm-shell command, this presents the prompt

(cbm)

The list of available commands is shown by the help command

(cbm) help

Documented commands (use 'help -v' for verbose/'help <topic>' for details):
===========================================================================
alias   detach     from_petscii  lock   rename        shell       unlist
attach  directory  help          macro  renumber      shortcuts   unlock
cat     edit       history       merge  run_pyscript  text        untext
copy    file       images        mkdir  run_script    to_petscii
delete  format     list          quit   set           token_set

Detailed information for a command is shown using help <command>.

Images need to be attached to a drive number in order to be used.

(cbm) attach mydisk.d64
Attached mydisk.d64 to 0

Up to ten images can be attached at any one time.

Files in an image can be addressed by prefixing the drive number followed by a colon. For example, to list a BASIC program in the image

(cbm) list 0:PRINT
5 INPUT"UPPER OR LOWER";C$:SA=0:IFC$="L"THENSA=7
10 INPUT"FILENAME";F$
11 OPEN4,4,SA
15 OPEN2,8,2,F$+",S,R"
20 GET#2,A$:IFST<>0THENPRINT#4:CLOSE4:CLOSE2:END
21 IFA$="π"THENA$=","
30 PRINT#4,A$;:GOTO20

Full documentation on Read the Docs.

TODO

  • more commands

  • better error handling

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

cbmshell-1.16.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

cbmshell-1.16-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file cbmshell-1.16.tar.gz.

File metadata

  • Download URL: cbmshell-1.16.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for cbmshell-1.16.tar.gz
Algorithm Hash digest
SHA256 1663836ec03d9dc73a371f5e94ac0416622d055f42e790405d415b0d63a25186
MD5 cc8666376969904c6c5b4e1545c0727b
BLAKE2b-256 5f810df45cf4007ab015113527724b64d13c5836bce39b322455fbb4fb2a9f07

See more details on using hashes here.

File details

Details for the file cbmshell-1.16-py3-none-any.whl.

File metadata

  • Download URL: cbmshell-1.16-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for cbmshell-1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 065f252ba6a66cb911a47fd2a30fe0fd7b0c6606ee31a1935697794d5bf987ff
MD5 4c4b42c08d111832dd293933c712a7a0
BLAKE2b-256 1f9182f604bcef88441fb671e1c0ba0e69eba0b910f8af4978029bc3aa9cb2ec

See more details on using hashes here.

Supported by

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