File: shebang.py

package info (click to toggle)
nbdkit 1.46.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,504 kB
  • sloc: ansic: 63,658; sh: 18,717; makefile: 6,814; python: 1,848; cpp: 1,143; perl: 504; ml: 504; tcl: 62
file content (17 lines) | stat: -rwxr-xr-x 254 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!../nbdkit python

disk = bytearray(1024 * 1024)


def open(readonly):
    print("open: readonly=%d" % readonly)
    return 1


def get_size(h):
    return len(disk)


def pread(h, buf, offset):
    end = offset + len(buf)
    buf[:] = disk[offset:end]