MCPcopy Create free account
hub / github.com/ActiveState/code / convert

Function convert

recipes/Python/578192_Linux_to_Windows/recipe-578192.py:42–45  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

40 os.rename(path, root + '.txt')
41
42def convert(path):
43 if not file(path, 'rb').read(2 ** 20).translate(TABLE, DELETECHARS):
44 data = file(path, 'r').read()
45 file(path, 'w').write(data)
46
47if __name__ == '__main__':
48 main()

Callers

nothing calls this directly

Calls 3

translateMethod · 0.45
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected