Thursday, April 5, 2012

The beginning of Python

For last few days, I was thinking of learning something new for development works. From several options I chose to learn Python. In fact, I was encouraged by google's tutorial for python by Nick Parlante. It really helped me to start python programming quickly. You may get it at -

I also got support materials at

Another very good python tutorial site for the beginners is
I worked with these sites and had some basic skills. I installed Python 2.7 in my machine and developed my first script
#!/usr/bin/python2.7 -tt

def main():
 print "Started learning python"

#boilerplate function
if __name__ == '__main__':

Executed the scipt


I got output -
Started learning python

I was happy and then went on my study and completed my first script to import wordpress blogs to a staging machine from production backup. I'll upload my script later.
However, in the script I had to make SSH connection with different servers, scp file from remote server to local server, connect with mysql and execute queries, restore mysql dump file to new mysql instance. All these tasks were pretty much easy with Python. Lots of library available, I utilized them and made my work.

Leave a Reply