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
    Likes Received:
    0
    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. Advertisements

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. Lucas Cowald
    Replies:
    4
    Views:
    1,489
    Tohid
    Oct 23, 2003
  2. Bernd Oninger
    Replies:
    1
    Views:
    1,058
    Martin Honnen
    Jul 7, 2004
  3. rkoida@yahoo.com
    Replies:
    4
    Views:
    2,223
    Terry Hancock
    Apr 23, 2005
  4. Donald Duck

    Best command for running shell command

    Donald Duck, Jul 11, 2006, in forum: Python
    Replies:
    3
    Views:
    610
    iapain
    Jul 11, 2006
  5. Casey T
    Replies:
    2
    Views:
    641
    Casey T
    Mar 13, 2008
  6. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    495
    Genich
    Oct 22, 2003
  7. Thomas Yager-Madden
    Replies:
    5
    Views:
    310
    Thomas Yager-Madden
    Sep 6, 2003
  8. Abhishek Srivastava

    Running perl script from command line

    Abhishek Srivastava, Feb 5, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    372
    Michele Dondi
    Feb 7, 2004
Loading...