Initial Glitches in Python Scripting by a Tyro

Google released its Google App Engine in April 2008 and I am enthralled by the idea of the Google. I have always been inclined in automating. Hence thought of learning Google App Engine and thereby confronted Python Scripting which Google App Engine supports. A novice user like me installs Pyhton 2.5.2 and Google App Engine SDK to develop a server application.

As one starts following the Google App Engine tutorial and trys to copy paste the code available in the tutorial pages one encounters numerous error jargons on the explorer. The coder needs to understand some basic requirements and understanding of Python scripting.

1. Python Script Files (.PY) use indentation to differentiate the blocks of code. It does not have curly braces (unlike in C,C++; BEGIN END in VB Scripts etc). Hence if you are writting blocks of statements be sure that you use indentation properly. One can use Python IDLE as a Editor of Python scripts. For example :

IF you are using IF statement the following should be the indentation


        print ‘User available’ — Observe the indentation. The block belongs to IF hence is lower indented


        print ‘User not available’ — Observe the indentation. The block belongs to ELSE hence is lower indented

2. One needs to run the command ‘ ….’ on the DOS Command Prompt not on the Python Command Line as I did.

These are some of the intial faults I committed during my encounter with Python language. I hope to come with some more soon as I face them. Hope the above two slip-ups of mine help novice developers.