Hi,

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.

python main_test.py

I get the following error.


File "<stdin>", line 1
  python main_test.py

Syntax Error: invalid syntax

My main file main_test.py is given below.

#!/usr/bin/env python

""" Test method to run the main method.

"""

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


if __name__ = "__main__":
  main()
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to