View Single Post
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#499
Big thanks slarti!
Originally Posted by slarti View Post
If you want to use the sys module then you have to import it just like you import other modules. Simply write import sys at the top.

I'm having trouble making thp's script behave nicely because of the generator object from which he prints the alarms.
I couldn't get it to work by simply adding import sys at the top too. So what about the syntax errors?

Originally Posted by slarti View Post
If you can settle for just the next alarm, here is my script added with a special character at the end of the line.
Yeah! Now I got the picture about the special chars in python. Works great.
Almost done now, just get rid of the 'No alarms' msg in a way that the line in BB disappears (and won't leave a blank line), if there's no alarm. Add the second alarm probably?
Edit: I'm already using your script for short weekday, could this be implemented in the above script to adopt to my language? I prefer short weekday very much over the "+1" from {events}, good idea! Probably we can have that for events too

General question:
Is "#!/bin/sh" or "#!/usr/bin/python" required in each script top line?
I thought "#" makes it get ignored...
__________________
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; 2013-01-12 at 01:12.