Browse Source

Don't use print

master
Samuel Sloniker 1 year ago
parent
commit
f05d866d84
Signed by: kj7rrv
GPG Key ID: 1BB4029E66285A62
  1. 6
      bin/ls.py
  2. 2
      bin/ps.py

6
bin/ls.py

@ -10,13 +10,13 @@ def get_app_class(template):
try:
for file in os.listdir(path):
print(file)
self.console.write(file)
except OSError as e:
try:
os.stat(path)
print(path)
self.console.write(path)
except OSError:
print(f"ls: cannot access '{path}': No such file or directory")
self.console.write(f"ls: cannot access '{path}': No such file or directory")
self.exit()

2
bin/ps.py

@ -5,7 +5,7 @@ def get_app_class(template):
for pid, app in apps.items():
args = app.argv[1:]
name = app.name
print(f'{pid} {name} {args}')
self.console.write(f'{pid} {name} {args}')
self.exit()
return App

Loading…
Cancel
Save