mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[doc] Wrapper for elinks binary under dosemu
It filters out startup messages of dosemu.
This commit is contained in:
parent
86be32f9f7
commit
7b2932354e
16
doc/tools/elinks_dos.py
Executable file
16
doc/tools/elinks_dos.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == '__main__':
|
||||
was_elinks = False
|
||||
d = os.path.dirname(os.getenv('ELINKS_BINARY'))
|
||||
with os.popen('dosemu -dumb -K {0} -E "elinks {1}"'.format(d, sys.argv[1]), 'r') as fi:
|
||||
for line in fi:
|
||||
if not was_elinks:
|
||||
if not line.startswith('ELinks'):
|
||||
continue
|
||||
was_elinks = True
|
||||
print(line, end='')
|
||||
sys.exit(0)
|
Loading…
Reference in New Issue
Block a user