import os.path
os.path.normpath('hello\x00world')
# this should ouput 'hello\x00world'
os.path.normpath('\x00hello')
# this should output '\x00hello'