repo.or.cz
/
nbdkit
/
ericb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
server: Allow -D debug flags to contain dots for namespacing.
[nbdkit/ericb.git]
/
tests
/
shebang.py
blob
0634589a40ec6aa4f4ee55ad71ae5bf1ab456949
1
#!../nbdkit python
2
3
disk
=
bytearray
(
1024
*
1024
)
4
5
6
def
open
(
readonly
):
7
print
(
"open: readonly=
%d
"
%
readonly
)
8
return
1
9
10
11
def
get_size
(
h
):
12
global
disk
13
return
len
(
disk
)
14
15
16
def
pread
(
h
,
buf
,
offset
):
17
global
disk
18
end
=
offset
+
len
(
buf
)
19
buf
[:] =
disk
[
offset
:
end
]