Commit graph

5 commits

Author SHA1 Message Date
Mike Swanson
765f864d84 man: make scripts Python2 compatible again.
My last commits broke functionality for Python2, but it's relatively
simple to fix.

open() becomes io.open() -- it effectively does nothing for Python3,
but for Python2 it uses a backported version of the open() call.

Python2 uses bytes and strings interchangably, but I needed to use
stdout.sys.buffer for writing arbitrary bytes data to stdout.
Conditionally call the appropriate stream depending on Python version.
2017-01-21 07:13:08 -08:00
Mike Swanson
bf3747bfdd man/{docgen,simplecpp}: Force UTF-8 reading and writing regardless of locale
When encountering non-ASCII UTF-8 characters in source files (as
exists in Crispy Doom), the Python scripts would fail to work with
a UnicodeDecodeError if the locale was not a UTF-8 one (eg, the C
locale as encountered in chroot build environments).

Let's just use UTF-8 on both open() and replace print() statements with
sys.stdout.buffer.write().  This guarantees that all input and output is
UTF-8 regardless.
2017-01-19 12:48:35 -08:00
Simon Howard
c39fd3c54c Use .items() rather than .iteritems() for compatibility with Python 2.7
and Python 3.0 (thanks chungy).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2726
2013-10-28 01:30:56 +00:00
Simon Howard
b0a0f90cd9 Rework documentation system to generate INSTALL files tailored for the
different games.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2652
2013-09-15 22:41:33 +00:00
Simon Howard
eca0d817b7 Replace the INSTALL file with a template version that is customized to
different platforms.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2299
2011-03-10 19:03:23 +00:00