thedead1440
|
2012-10-07
, 16:00
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#221
|
|
2012-10-07
, 16:05
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#222
|
|
2012-10-07
, 16:08
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#223
|
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
|
2012-10-07
, 16:15
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#224
|
Nothing?
So the operation not permitted doesn't come and it simply goes to the next line?
{script:python /home/user/uptime.py}
|
2012-10-07
, 16:26
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#225
|
RM696-21-3_PR_005:~# python /home/user/uptime.py 2:53
|
2012-10-07
, 16:47
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#226
|
|
2012-10-07
, 16:49
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#227
|
Of course I believe YOU, I just don't believe I did it the correct way.
Might it be that the python-script has to be coded in UTF8 instead of ANSI?
Sorry, I have no coding skills, I just followed these instructions and copy/pasted that code.
|
2012-10-07
, 17:19
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#228
|
|
2012-10-07
, 17:21
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#229
|
|
2012-10-07
, 17:22
|
Posts: 63 |
Thanked: 46 times |
Joined on Feb 2012
|
#230
|
Think I found a bug:
After watching a video with the default player, the title was still displayed after player was closed. Reboot emptied the line.
Still struggling with the python-script for uptime here.
My desktop is a Win7 and I used notepad++ for creating this script
Coding was set to ANSI and I simply saved as python. Then copied it to /home/user, became root and triedCode:#!/usr/bin/python import datetime seconds = int(float(open('/proc/uptime').read().split()[0])) print str(datetime.timedelta(0, seconds))[:-3]
But got "operation not permitted". Where did I fail?Code:chmod +x /home/user/uptime.py
The Following User Says Thank You to nicodonte For This Useful Post: | ||