Python is actually an easy language to learn and use. IDLE is an iffy IDE to use. One thing about IDLE that drives me nuts is that when it saves a file, it converts tabs to spaces (you can adjust how many in the prefs). This causes impossible to find indentation errors because several spaces are NOT the same as a tab, but you can't see the difference on the screen.
# the standard way to put the main function after declaring functions and
# classes
if( __name__ == "__main__" ):
import sys
# check that the program was called with the correct number of arguments
if( len( sys.argv ) != 2 ):
sys.stderr.write( "\nusage: %s <argument>\n" % ( sys.argv[ 0 ] ) )
sys.exit( 1 )
else:
# do something nifty
sys.exit( 0 )