Making progress in python

This commit is contained in:
Lord Of Nougate 2022-05-13 23:49:27 +02:00
parent 86d70c0e93
commit 6c0ba4b0af

27
motd.py
View File

@ -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)