kopia lustrzana https://github.com/micropython/micropython-lib
upysh: Use "man" command for upysh help, leaving Python's help() alone.
Idea by @robert-hh.pull/81/head
rodzic
d316ee22f0
commit
fafc3ef2c5
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue