Displaying 2 results from an estimated 2 matches for "single_file".
2015 Oct 29
2
[nbdkit] can't import mmap
...(f,m)
def get_size(h):
size = 1024*1024
def pread(h, count, offset):
(f,m) = h
bytes = bytearray(m[offset:offset+count])
return bytes
def pwrite(h, buf, offset):
(f,m) = h
m[offset:offset+len(buf)] = bytearray(buf)
When I run this:
/usr/sbin/nbdkit -f -v python script=single_file.py
I get this error:
nbdkit: debug: registering
/usr/lib/x86_64-linux-gnu/nbdkit/plugins/nbdkit-python-plugin.so
nbdkit: debug: registered
/usr/lib/x86_64-linux-gnu/nbdkit/plugins/nbdkit-python-plugin.so (name
python)
nbdkit: debug: /usr/lib/x86_64-linux-gnu/nbdkit/plugins/nbdkit-python-plugin.s...
2015 Oct 29
0
Re: [nbdkit] can't import mmap
...count, offset):
> (f,m) = h
> bytes = bytearray(m[offset:offset+count])
> return bytes
>
> def pwrite(h, buf, offset):
> (f,m) = h
> m[offset:offset+len(buf)] = bytearray(buf)
>
>
> When I run this:
>
> /usr/sbin/nbdkit -f -v python script=single_file.py
>
>
> I get this error:
>
> nbdkit: debug: registering
> /usr/lib/x86_64-linux-gnu/nbdkit/plugins/nbdkit-python-plugin.so
> nbdkit: debug: registered
> /usr/lib/x86_64-linux-gnu/nbdkit/plugins/nbdkit-python-plugin.so (name
> python)
> nbdkit: debug: /usr/lib/x86_...