* pygnulib/GLImport.py (GLImport.prepare): Detect terminals starting
with 'xterm'. Change hexadecimal numbers to octal, matching
gnulib-tool.sh.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
+2024-03-29 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Display specified modules in bold.
+ * pygnulib/GLImport.py (GLImport.prepare): Detect terminals starting
+ with 'xterm'. Change hexadecimal numbers to octal, matching
+ gnulib-tool.sh.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
+
2024-03-29 Bruno Haible <bruno@clisp.org>
attribute: Work around compiler bug of Oracle cc 12.6.
if verbose >= 0:
bold_on = ''
bold_off = ''
- term = os.getenv('TERM')
- if term == 'xterm':
- bold_on = '\x1b[1m'
- bold_off = '\x1b[0m'
+ term = os.getenv('TERM', '')
+ if term.startswith('xterm') and os.isatty(1):
+ bold_on = '\033[1m'
+ bold_off = '\033[0m'
print('Module list with included dependencies (indented):')
for module in final_modules:
if str(module) in self.config.getModules():
if verbose >= 0:
bold_on = ''
bold_off = ''
- term = os.getenv('TERM')
- if term == 'xterm':
- bold_on = '\x1b[1m'
- bold_off = '\x1b[0m'
+ term = os.getenv('TERM', '')
+ if term.startswith('xterm') and os.isatty(1):
+ bold_on = '\033[1m'
+ bold_off = '\033[0m'
print('Module list with included dependencies (indented):')
specified_modules_set = { str(module)
for module in specified_modules }