Skip to main content

d64

This Python module enables access to disk image files (.d64, .d71, .d80, .d81, .d82) used by various Commodore microcomputer emulators and tools.

It provides familiar interfaces for developers to read and write program and data files within an image.

In addition it contains tools useful to inspect and modify images, for example a script to check the integrity of an image.

Examples

Classes and functions reside in the d64 module, the whole module may be imported or just those definitions referenced by the user.

Displaying an image contents

To perform a directory list

from d64 import DiskImage

with DiskImage('squadron.d64') as image:
    for line in image.directory():
        print(line)

This prints out

0 "SQUADRON        " Q9 2A
15   "SQUADRON PAL"     PRG
15   "SQUADRON NTSC"    PRG
634 BLOCKS FREE.

Copying a file from an image

To extract, for example, a BASIC program and write it to a file

from d64 import DiskImage

with DiskImage('test.d64') as image:
    with image.path(b'METEOR').open() as in_f:
        with open('meteor.prg', 'wb') as out_f:
	    out_f.write(in_f.read())

TODO

  • detailed documentation
  • better docstrings
  • more examples

Release files for d64 1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for d64 1.10
File Size Uploaded
d64-1.10.tar.gz 59.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for d64 1.10
File Interpreter ABI Platform
d64-1.10-py3-none-any.whl Python 3 none any Details

Total release size:107.4 kB

Release files / d64-1.10.tar.gz

Download URL d64-1.10.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
476c6a6dfe953ec74c3ee2eb6b29c59ca47200b095a8826d0c130139e21cc12a
BLAKE2b-256 checksum
How to use checksums
d5650dc610c28e1a3050880b326801520dff5b42ba26e4ed9c0f029ef4afd8bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.14

Release files / d64-1.10-py3-none-any.whl

Download URL d64-1.10-py3-none-any.whl
Size 48.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e240bdabfa2130e6141eed2a29de80727ef68af0f3beccf292bf8e26d08a530
BLAKE2b-256 checksum
How to use checksums
b6bf68e5be370da48925783acd3e4d105cb744cb80b8c43bf1ccb68930bb59ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.14

Release history Release notifications | RSS feed

This release

1.10 This release

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.20

2 release files

0.19

2 release files

0.18

2 release files

0.17

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page