25 lines
588 B
Python
25 lines
588 B
Python
import os
|
|
import os.path
|
|
|
|
from formatters import *
|
|
from raw_commands import RawCommand
|
|
|
|
# Load all of the commands in the path into the global namespace as raw
|
|
# commands.
|
|
for path in os.environ['PATH'].split(':'):
|
|
if os.path.exists(path):
|
|
binaries = os.listdir(path)
|
|
for binary in binaries:
|
|
if binary not in globals():
|
|
globals()[binary] = RawCommand(binary)
|
|
|
|
|
|
def main():
|
|
from console import HistoryConsole
|
|
console = HistoryConsole(globals())
|
|
console.interact("Augmented Unix Userland")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|