GNUnet  0.10.x
removetrailingwhitespace.py
Go to the documentation of this file.
1 #!/usr/bin/python3
2 
3 import sys
4 import re
5 
6 
7 for fileName in sys.argv[1:]:
8  f = open(fileName, 'r+')
9  fileString = f.read()
10 
11  fileString = re.sub(r'[ ]+\n', r'\n', fileString)
12  fileString = re.sub(r'\r', r'', fileString)
13  f.seek(0)
14  f.write(fileString)
15  f.truncate(len(fileString))
uint16_t len
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer byt...