mirror of https://github.com/ecmwf/eccodes.git
ECC-417: Comments
This commit is contained in:
parent
364df3a99d
commit
b5aa1ae871
4
memfs.py
4
memfs.py
|
@ -9,11 +9,11 @@ assert len(sys.argv) > 2
|
||||||
|
|
||||||
dirs = [os.path.realpath(x) for x in sys.argv[1:-1]]
|
dirs = [os.path.realpath(x) for x in sys.argv[1:-1]]
|
||||||
print(dirs)
|
print(dirs)
|
||||||
# exit(1)
|
|
||||||
|
|
||||||
FILES = {}
|
FILES = {}
|
||||||
NAMES = []
|
NAMES = []
|
||||||
|
|
||||||
|
# The last argument is the generated C file
|
||||||
g = open(sys.argv[-1], "w")
|
g = open(sys.argv[-1], "w")
|
||||||
|
|
||||||
for directory in dirs:
|
for directory in dirs:
|
||||||
|
@ -46,6 +46,8 @@ for directory in dirs:
|
||||||
#Python 2 and 3
|
#Python 2 and 3
|
||||||
fcont = binascii.hexlify(f.read())
|
fcont = binascii.hexlify(f.read())
|
||||||
|
|
||||||
|
# Read two characters at a time and convert to C hex
|
||||||
|
# e.g. 23 -> 0x23
|
||||||
for n in range(0, len(fcont), 2):
|
for n in range(0, len(fcont), 2):
|
||||||
twoChars = fcont[n:n+2]
|
twoChars = fcont[n:n+2]
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info.major > 2:
|
||||||
|
|
Loading…
Reference in New Issue