21

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.

Comments
  • 3
    I read the code my friend ... good one ... keep going :)
  • 1
  • 1
    Is 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
  • 3
    Everyone's is permanently in a learning phase. Keep it up.
  • 4
    I 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.
  • 1
    I remember my first days as a n00b...harrowing! Keep going 👍
  • 1
    @nmunro wow thank you for your suggestion. I will try to do that :)
  • 1
    Thank You everyone for your nice comments :) Reading all those comments motivated me.
  • 1
    @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
Add Comment