Making progress in python
This commit is contained in:
parent
86d70c0e93
commit
6c0ba4b0af
27
motd.py
27
motd.py
@ -1,6 +1,10 @@
|
||||
#!/bin/python
|
||||
|
||||
import os
|
||||
import ueberzug.lib.v0 as ueberzug
|
||||
import curses
|
||||
import time
|
||||
from curses.textpad import Textbox, rectangle
|
||||
|
||||
modpath = os.path.dirname(__file__)
|
||||
cachefile = "/tmp/waifu.cache"
|
||||
@ -16,7 +20,26 @@ minTermW = 200
|
||||
|
||||
#print len([name for name in os.listdir(f'{modpath}/waifus') if os.path.isfile(name)])
|
||||
DIR=modpath + '/waifus'
|
||||
print(len([name for name in os.listdir(DIR) if os.path.isfile(os.path.join(DIR, name))]))
|
||||
#print(len([name for name in os.listdir(DIR) if os.path.isfile(os.path.join(DIR, name))]))
|
||||
|
||||
print(modpath)
|
||||
#print(modpath)
|
||||
|
||||
@staticmethod
|
||||
def showImage():
|
||||
print("showImage")
|
||||
|
||||
def showUname(unameArg):
|
||||
os.system("/usr/bin/uname " + unameArg)
|
||||
|
||||
|
||||
|
||||
def showUptime(uptimeArg):
|
||||
os.system("/usr/bin/uptime " + uptimeArg)
|
||||
|
||||
def doLolcat():
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
showUname(unameArg)
|
||||
showUptime(uptimeArg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user