Archive

Archive for December, 2009

Python & The Editors

December 31, 2009 3 comments


To tell about python editor’s there are many editors available for python, like activetstate’s komodo, python wingware, Stani’s etc. The choice of text editor to choose depends upon you, the operating system you use, the number of features your require from your text editor, etc. Here I am writing my own list of text editors, that i have used. Theres also this good little article i found on about.com on “Choosing a Text Editor for Python Programming” http://python.about.com/od/gettingstarted/ss/text_editors.htm.


Geany: Geany is that little editor, i keep at hand for any purpose, whether i wanna write an article or do some coding stuff, i prefer to use geany most of the time, its simple and lightweight, to be honest, the main thing i started using geany is, it opens with all pages and tabs from where you had left, if you have shut down your computer and when you come back and start your computer, you start geany, and it will open up with all the tabs that you had left open to work upon. i couldn’t find this feature in any other editors i have used so far. And it also has lots of other features, to view the different features of Geany, you can visit this link Here.


Vim: vim for sysadmins they call it as vi, this is also one powerful editor, its a unix editor, it also has this plugin feature, you can configure to act as a python editor, and being a unix editor, comparatively its the most light-weight and has a lot of features that can configured as required. And if you want to get a good hands on vim and want to have a good knowledge about the editor, i suggest you read swaroopch’s “A Byte of Vim”, you will learn about the different features of vim and how it can be used and also how you can configure vim to be the editor of your choice. And you can also visit this link http://0xbabaf000l.blogspot.com/ it has lot of comic strips about vim, gnu and other stuff.


gedit: its the is the official text editor of the GNOME desktop environment. sure it is again a light-weight editor but, i won’t call it powerful and neither it has that many features, all i would say its a simple little editor that can get your work done, it sure has the plugins feature, for a list of its features visit the Gedits official website page here: http://projects.gnome.org/gedit/index.html





ActiveState Komodo Edit: Now here we come to the hard core editor, Komodo Edit supports PHP, Python, Ruby, Perl and Tcl, plus JavaScript, CSS, HTML and template languages like RHTML, Template-Toolkit, HTML-Smarty and Django. This is again one of my favorite editors after Geany, its not light-weight as the other editors i have mentioned till now, you can’t expect it to be a light-weight, as it has lots of features, Multi-language support, Project management, toolbox, Extensions, plugins, code snippets, html preview, etc. read the complete list of features here: http://www.activestate.com/komodo_edit/features/
And its available for linux as well as windows and Mac.


These are some of the editors that i have used so far for coding in python, these editors are free, there are other editors too like Stani’s python editor, pydev, Boa constructor, bluefish (never tried those) but i will still stick to Geany, as i have got used to it, and it has that one feature that i always wanted, of opening up with all the tabs from where you had left.

stepup2: Python

December 29, 2009 Leave a comment


posting after a long time, its been over 2 months since the last post. can’t help it, that’s the life of a sysadmin. ok, moving on to this post, as i have decided that i would be writing on mostly python, as that has become my favourite programming language. now after a long break, continuing back on my learning python journey, I have picked up this Book: Python for Unix and Linux system administration By Noah Gift and Jeremy Jones. I have still not completed the book, just reached the 4th chapter, but I am seriously liking it, After recommending Magnus Lie Hetland’s “Beginning python from novice to professional”, this is one another book that i would recommend for beginners as well as for any person wanting to learn python, its very well and clearly explained, and the one good thing, i liked is, lot of practical examples.


Please don’t be bored, To start with, Authors Acknowledgement, Yes!, I am mentioning this part, it might sound boring, why need to start with Acknowlegdement, If you look at Noah’s acknowledgement, its a very very long Thank’s giving list, But!, I liked it, that was something really humble, he has thanked each and every freind and mentor he has met, even his teachers at school, its really quite interesting.


Moving onto the next best part Chapter 1, “Introduction”, the question, Why Python?, I clearly agree to what the Author’s have explained about why to use python. Some reasons from the book that i would mention, Yes, Python is easy to learn. If a language can’t help you become productive pretty quickly, the lure of that language is severely diminished. Why would you want to spend weeks or months studying a language before you are able to write a program that does something useful? This is especially the case for sysadmins. If you can’t learn a language quickly enough to start writing scripts with it almost immediately, you should strongly question whether you should be learning it. However, a language that is easy to learn but doesn’t allow you to do fairly complex tasks isn’t worth much either. So the second reason to consider Python to be an
excellent programming language is that, while it lets you start simply, it also allows you to perform tasks that are as complex as you can imagine.


In this introduction part they have also taken some little examples and compared doing the same task in python and then doing the same thing in Perl and Bash and the difference between them. And there’s this little article called “Motivation”, this is a really good little article for people who are new to programming and are learning programming for the first time.


Then they move on to “The Basics”, here you will get to know about ipython, its features, benefits and how to use it, even i never knew there was something like ipython and really useful. along with ipython the chapter takes you further on functions in python and import statements in python and other basics.

Read more…

Follow

Get every new post delivered to your Inbox.