py3k

Python 3 compatibility tools.

Copied from numpy/compat/py3k.

Please prefer the routines in the six module when possible.

BSD license

asbytes(s)

asbytes_nested(x)

asstr(s)

asunicode_nested(x)

getexception()

ints2bytes(seq)

isfileobj(f)

open_latin1(filename[, mode])

asbytes

nibabel.py3k.asbytes(s)

asbytes_nested

nibabel.py3k.asbytes_nested(x)

asstr

nibabel.py3k.asstr(s)

asunicode_nested

nibabel.py3k.asunicode_nested(x)

getexception

nibabel.py3k.getexception()

ints2bytes

nibabel.py3k.ints2bytes(seq)

isfileobj

nibabel.py3k.isfileobj(f)

open_latin1

nibabel.py3k.open_latin1(filename, mode='r')