fibonaccios/bin/ps.py
2022-11-30 19:33:05 -08:00

14 lines
352 B
Python

import console
def get_app_class(template):
class App(template):
def F_main(self):
apps = self.os.apps
for pid, app in apps.items():
args = app.argv[1:]
name = app.name
console.write_str(self.console, f'{pid} {name} {args}\n')
self.exit()
return App