silly question about Running a script from the command line

Discussion in 'Python' started by A.Rock, Apr 10, 2013.

  1. A.Rock

    A.Rock

    Joined:
    Apr 10, 2013
    Messages:
    1
    hello everybody.
    I am a completely beginner in python.
    I would like to Run a script from the command line. I have created the script ex.py (simple "hello word" script), then saved it as "ex.py" on a directory.
    from the command line I have entered the directory, then made python start.
    I typed:

    % python -i ex.py

    and as a result I have "Syntax error: invalid syntax"
    with a small arrow pointing at %.

    why?
    thank you everybody!
    A.Rock, Apr 10, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Donald Duck

    Best command for running shell command

    Donald Duck, Jul 11, 2006, in forum: Python
    Replies:
    3
    Views:
    393
    iapain
    Jul 11, 2006
  2. Casey T
    Replies:
    2
    Views:
    366
    Casey T
    Mar 13, 2008
  3. Thomas Yager-Madden
    Replies:
    5
    Views:
    118
    Thomas Yager-Madden
    Sep 6, 2003
  4. Abhishek Srivastava

    Running perl script from command line

    Abhishek Srivastava, Feb 5, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    177
    Michele Dondi
    Feb 7, 2004
  5. George Orwell

    Silly li'l perl script, plx improve.

    George Orwell, Jan 4, 2007, in forum: Perl Misc
    Replies:
    5
    Views:
    138
    Eric Schwartz
    Jan 4, 2007
Loading...

Share This Page