Wednesday, May 22, 2013

Presenting GNotiPy Part One all have a language that we choose to use whenever it is that we have a choice. Recently, my go to language has become python. Usually the things that I do with it are small and unimportant scripts to parse logs or iterate a list of data (I mean...list I right). I have never tried to use it for anything other than that until my wife had asked if I could help her with something. It turns out that she is on the board for a small non-profit organization. One of the tasks that she has to do is to manage the calendar (which to their credit is a Google Calendar). Her duties require her to send out weekly e-mail notifications to people who have signed up to volunteer for events that week. These notifications are just friendly reminders that these people have signed up reminding them of the date and time. My wife, knowing that I enjoy doing stuff like this, asked me if I could automate the E-mail process for her. I said yes and immediately thought Python would be the way to go for this.

For this purpose I also decided to give Eclipse a try once again because I planned on pushing this to GitHub and using Google App Engine to run it as well and I wanted an easy interface for the whole process (I love Emacs, but AppEngine + GitHub + Windows != Easy with Emacs, feel free to correct me in the comments). 

Requirements needed to start:
Getting Set up:
First I need to get Python installed. After downloading Python, you run the installer. It is pretty straight forward for Window (you know the drill hit "next" a few times). Now that Python is installed, I do something that everyone should do after installing Python in a windows environment. Create a new environment variable (if it doesn't already exist) called PATH (right-click my computer -> advanced -> environment variables) and set the value to the location of your Python installation (in my case C:\Python27):
If you want to be able to use Python and it's tools from anywherre in the command prompt, I suggest that your PATH variable have the following values:

That should now complete the base Python install.But I am not yet done with Python. I will (at a later time) need to install many other Python packages and libraries (especially as I get into this project and others). So, I start by installing Distribute and PIP (choose either x86 or x64 and version for python2.7). These will allow me to install almost any other library there is. Then I installed the Google API client library as a test by going to the command prompt and typing:
pip install --upgrade google-api-python-client

That should install the google api package and prove that Python and PIP are working.

Next I installed Eclipse and PyDev. After downloading Eclipse, I began the install process for PyDev by clicking on Help -> Install New Software:
Then I entered the address (link above) for the PyDev software and selected it. Then clicked on Next.
Then I did the same process for AppEngine (link above). and now Eclipse should be set-up and ready to go!

In my next post I will go over getting GitHub set up with Eclipse and creating and updating the repo.