[ale] Adding 'uptime' to python sig
trey at fastmail.fm
Sat Feb 14 18:21:44 EST 2004
I have a python script that I use currently in my sig and wanted to add
a line to show the output of the 'uptime' command.
Would someone be able to tell me how to do this? Such as add it as a
line under the current sig? Here's the script I'm using:
# change this to point to your file of quotes
aff_file = "/home/trey/quotes.txt"
import string, random
# hack this at will
print "-- <br>"
# cryptic python stuff which pulls a line from a text file
# at random
affs = open(aff_file,"r")
affs = affs.readlines()
aff = affs[int(random.random() * len(affs))].split("\n")
# print the randomly selected line
men fear thought as they fear nothing else on earth
--more than ruin
--more even than death.
thought is subversive and revolutionary,
destructive and terrible,
thought is merciless
established institutions, and comfortable habit.
thought looks into the pit of hell and is not afraid.
thought is great and swift and free,
the light of the world, and the chief glory of man.
More information about the Ale