View Single Post
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#497
Originally Posted by slarti View Post
What does it say in termimal when you run it? The python interpreter usually tells you where the problem is.
The output for
Code:
sys.stdout.write('\n'.join(sorted(get_queued_alarms())))
is >-sh: syntax error: unexpected word (expecting ")")<

The output for
Code:
print '\n'.join(sorted(get_queued_alarms())) or 'No alarms'
is >-sh: syntax error: unexpected "("<
So there seems an issue with the "()'s" - I just can't resolve it.

Originally Posted by slarti View Post
Did you import the sys module?
What's that exactly? - I only installed python an python-dbus.

Originally Posted by slarti View Post
You can get special characters with the print function, too. Just encode them to utf-8.
Could you paste your code in the script, so it's placed correct and post here?

Originally Posted by thp View Post
Yes, {{color}} only goes to the end of the current line for now. What you could do is set the global color to blue, and then prefix every line that you don't want to have in blue with the desired color.
Will try that.
Thanks everybody.
__________________
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