Newbie Question:Please help

Karthik Krishnan krishnan.1000 at
Tue Sep 9 08:10:42 CEST 2008


I am a newbie to python and I hope this is not a stupid question. I am
trying to run a main method from a Python command line using the command
shell using the command.


I get the following error.

File "<stdin>", line 1

Syntax Error: invalid syntax

My main file is given below.

#!/usr/bin/env python

""" Test method to run the main method.


def main():
  print "Main method called.";

if __name__ = "__main__":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list