pydev

Google Apps Engine: Python’s Way


Hi

As part of my welcome pack for developing in Google Application Engine (aka GAE), I had to chose between two languages: Java or Python. Because of my most recent work involves C# most of the time, the most obvious option wasJava. However, the client has their systems in Pyhon… so? I’m mastering Python in 3 days ;-).

THE LANGUAGE

My first approach was reading the language specification (it wasn’t a very smart option). So, my second attempt was using Wikipedia (aka wiki) to know more Python. Luckily Wiki has a good idea of how to define Python‘s language.

http://en.wikipedia.org/wiki/Python_(programming_language)

It might emphasize some points:

  • Python is a high-level programming language ( It means, that you don’t have to think as if you were coding for assembler)
  • It supports many programming paradigms (imperative, functional and object oriented). IMHO it’s a really strong functional programming language.
  • The syntax is simple to read, however I think if you aren’t familiar with functional languages, it would be good to start reading the tutorial instead of getting directly into the code. If you need to check some functional programming concepts you can take a look to http://en.wikipedia.org/wiki/Functional_programming
  • The language has a set of implementations (or flavors). So the main concepts are shared among implementations, however there might be particular details in some specific flavors. BTW, some popular flavors are CPhyton, IronPython, Python, and JPhython.

THE PLATFORM

First of all, you’ll need to get Python at www.python.org/. Then, you can decide if you want to use an IDE or just a text editor. I strongly recommend to read the Pythons official tutorial at http://docs.python.org/tutorial/,  (and sadly I cannot explain python in a post, and it will be impossible for being a novice on this language ).

ADDITIONAL SDKs

Then if you want to install Google’s App Engine, it might be a good moment for doing it.  ;-), it can be downloaded at http://code.google.com/appengine/. Certainly you might need to add additional packages to your python installation depending on what need to do.

THE DEVELOPMENT ENVIRONMENT

Another important aspect of learning a new language is selecting the right tool. Ok, here there are some purists that suggest to learn by using simple text editors instead of an advance IDE for developing. It’s up to you whether or not to use an IDE.

Now, let’s talk about the tool. The best free tool I’ve found it’s Eclipse (http://eclipse.org/downloads/)and you can use a plugin called Pydev (www.pydev.org/) in order to support pythons develelopment.  At this time pydev offers a really nice set of tools, such as:

  • debugging
  • code coverage
  • code snippets
  • refactoring
  • code auto-completion
  • And all the other steroids that are already included in Eclipse (such as projects structure, the chance to integrate to a source control tool… etc)

I can suggest to see the following link in order to get quick getting started about how to set up eclipse and python.  The video might be outdated, however this guy goes direct to the point in how to set up your environment and take advantage of the pydev plugin see at http://blog.vlku.com/index.php/2009/06/10/djangoeclipse-with-code-complete-screencast/

If you wan to know more about pydev and it can do for you, you can check http://www.pydev.org/manual_adv_complctx.html

I’m running out of time, so this is it for today. Unfortunately, I haven’t became the Pythons expert that I wanted… however I’ve spent only 3 days reading about python ;-).  It’s a good start for me (considering that python is not the only thing that I’m learning …. sigh ….)

Anyway, happy coding!

Herberht

Advertisements