Commit Graph

11 Commits

Author SHA1 Message Date
Xavier Bonaventura
fb0f210598 Use os.path.join to create paths
Paths should be created using os.path.join with this way is platform
independent.
2021-01-10 21:40:05 +10:00
Xavier Bonaventura
107ab7f6e9 Use list comprehension instead of extending the collection 2021-01-10 11:09:37 +10:00
Xavier Bonaventura
4e5fe20519 Use context manager instead of raw open
Raw open should be avoided to prevent that in case of an exception
the file is not closed.
This also has the advantage that if the user forgets to call close
the file is still closed.
2021-01-10 11:08:48 +10:00
TheVice
1f833c032f [parse_xml] resolved "TypeError: a bytes-like object is required, not 'str'"
after commit 10f2d76c62 was applied.
2019-03-17 22:48:22 +10:00
TheVice
1b17b0b210 [parse_xml] replaced OptionParser with ArgumentParser according
to depreciation of first one starting from Python version 3.2.
2019-03-17 22:48:22 +10:00
Valentin Sarthou
10f2d76c62 Write files in binary format in parse_xml.py
Issue:
On Windows platforms, when writing files with python in text-mode, LF
characters get converted to CRLF.
This behavior leads to incorrect code generation in the steps following
parse_xml.py

Fix:
Replace file access mode by 'wb' to avoid any platform-dependent behavior
regarding newlines.
2019-03-17 09:03:24 +10:00
Nigel Stewart
dcff76b0d1 Type-mapping isn't needed for parse_xml.py WGL purposes, after all 2019-02-04 07:58:55 +10:00
Nigel Stewart
62b9213b44 Use parse_xml.py for WGL code generation 2019-02-04 07:58:55 +10:00
Nigel Stewart
8047ef41fa parse_xml.py touch-up for Python 3 (or Python 2) 2016-05-21 07:59:11 +10:00
Nigel Stewart
15881f0421 EGL fixup for void parameter lists, additional defines 2016-02-06 12:41:17 +10:00
Nigel Stewart
43a9299230 Initial EGL core and extension support with Python egl.xml spec parser 2016-02-06 12:41:11 +10:00