Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
atheist99718yIs it just me or is your code file missing a .py extension? I know you have the shebang but makes it easier for people to work out what it is
-
nmunro31888yI like it, I don't see why this shouldn't run on my machine, I'll give it a go over lunch tomorrow.
Have you considered putting the time and activities in a json file? That way the application can be configured and you don't have to have an ever growing list of if statements.
Just on the beginning of your loop you check to see if there's a time that matches the hour of the current time, if there isn't drop to the else clause, wait five minutes and try again. -
Thank You everyone for your nice comments :) Reading all those comments motivated me.
-
@alwaysmpe It's a common thing to do on *nix systems, to write tools and commands without an extension. One of the benefits is you can swap out the implementation (say, convert the script to bash or Perl) and no one has to know, other commands and scripts that use it don't have to change
I am on a learning phase. Just wrote my first python script. Please have a look at it on
https://github.com/rabingaire/... . Its a basic stuff for experienced developer but a huge step for me.
undefined