Learning Python

So I learnt Python this week.

For a while now, I have found myself wanting to automate repetitive tasks. I have tried writing scripts in BASH on Ubuntu and whatever command line based language Windows uses. But very quickly it becomes too complicated!

At the same time, I have been hearing a lot about this Python language. People saying how simple it is. I decided to look into it.

I landed on their official tutorial.

The very first paragraph states that it is an ideal language for “ideal language for scripting” and automating tasks. Great!

So I managed to find this great website called learnpython.

It takes you through the basics of Python and at the end of each chapter gives you a little terminal to practice what you have learnt. Within an hour, I managed to get through all of the basics.

After I had finished, I wrote my first script.

It allows you to update your host file without having to go into it an edit it. It is still in its very early stages and only works on Ubuntu. But it is definitely a great start.

If you want to start automating tasks, I would definitely recommend Python. It is easy to use and fairly powerful and so can probably do most of what you want to do without any extensions. Also, there is a vast community using it and many modules have probably already been written to help you out!

P.S. The host file editor can be found on GitHub here.

© 2012-2023