Commit 21987131 authored by Matthias Putz's avatar Matthias Putz

added portable pager tests

parent 7ab10cce
This diff is collapsed.
...@@ -291,7 +291,7 @@ def _AddPasswordFromUserInput(handler, msg, req): ...@@ -291,7 +291,7 @@ def _AddPasswordFromUserInput(handler, msg, req):
if user is None: if user is None:
print(msg) print(msg)
try: try:
user = raw_input('User: ') user = input('User: ')
password = getpass.getpass() password = getpass.getpass()
except KeyboardInterrupt: except KeyboardInterrupt:
return return
......
...@@ -54,6 +54,21 @@ def _BecomePager(pager): ...@@ -54,6 +54,21 @@ def _BecomePager(pager):
if __name__ == '__main__': if __name__ == '__main__':
RunPager() if len(sys.argv) == 1:
print('run pager')
import subprocess
import platform
#subprocess.call(["python3.3", "portable-pager.py", "1", "| less"])
if platform.system() != "Windows":
python = "python3.3"
else:
python = "python"
os.system("%s portable-pager.py 1 | less" % python)
#RunPager()
else:
print('output data')
for i in range(0, 100): for i in range(0, 100):
print("%d" % i) print("%d" % i)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment