upysh: Use "man" command for upysh help, leaving Python's help() alone.

Idea by @robert-hh.
pull/81/head
Paul Sokolovsky 2016-07-03 15:50:46 +03:00
rodzic d316ee22f0
commit fafc3ef2c5
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -55,18 +55,20 @@ def newfile(path):
f.write(l)
f.write("\n")
def help():
print("""
This is 'upysh' help, for builtin Python help run:
import builtins
builtins.help()
class Man():
def __repr__(self):
return("""
upysh is intended to be imported using:
from upysh import *
To see this help text again, type "man".
upysh commands:
pwd, cd("new_dir"), ls, ls(...), head(...), cat(...)
newfile(...), rm(...), mkdir(...), rmdir(...)
""")
help()
man = Man()
print(man)