View Single Post
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#204
Well, as suggested on the project page...
How do I...
Show only the uptime without the login info?

Create a script /home/user/uptime.py like this:
Code:
#!/usr/bin/python
import datetime
seconds = int(float(open('/proc/uptime').read().split()[0]))
print str(datetime.timedelta(0, seconds))[:-3]
I'd like to have it displayed without the actual time in that line too.
Only e.g. "1 day, 3:45 hours".
Ideally, but not nescessarily, days and hours would be in local languange if possible.
(How) can this be done?

Thanks a lot for this nice app!
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member

Last edited by Win7Mac; 2012-10-07 at 20:45.