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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Lucas Cowald
    Replies:
    4
    Views:
    1,557
    Tohid
    Oct 23, 2003
  2. Bernd Oninger
    Replies:
    1
    Views:
    1,089
    Martin Honnen
    Jul 7, 2004
  3. rkoida@yahoo.com
    Replies:
    4
    Views:
    2,260
    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:
    630
    iapain
    Jul 11, 2006
  5. Casey T
    Replies:
    2
    Views:
    655
    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:
    524
    Genich
    Oct 22, 2003
  7. Thomas Yager-Madden
    Replies:
    5
    Views:
    326
    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:
    388
    Michele Dondi
    Feb 7, 2004
Loading...