Work on libgopher
This commit is contained in:
parent
85c2af7a37
commit
584fc75856
|
@ -26,5 +26,15 @@ def figlet(tex,**opts):
|
|||
ct.append("-"+k)
|
||||
ct.append(opts[k])
|
||||
ct.append(tex)
|
||||
for line in subprocess.check_output(ct).decode("ascii").split("\n"):
|
||||
text(line)
|
||||
out(ct)
|
||||
|
||||
def command_lines(ct):
|
||||
for l in subprocess.check_output(ct).decode("ascii").split("\n"):
|
||||
yield l
|
||||
|
||||
def out(ct,f=text):
|
||||
for l in command_lines(ct):
|
||||
f(l)
|
||||
|
||||
def command_t(ct):
|
||||
out(ct)
|
||||
|
|
|
@ -6,3 +6,6 @@ text("")
|
|||
text("libgopher is a python lib for making")
|
||||
text("gopher CGI scripts. it defines functions")
|
||||
text("which allow for easy formatting of output.")
|
||||
text("")
|
||||
text("uptime")
|
||||
command_t(["/usr/bin/uptime"])
|
||||
|
|
Loading…
Reference in New Issue