Im brand new at python and am trying to teach myself through a book.

Im trying to run a very simple command but I keep on getting a syntax error.

If someone could take a look at it and tell me what im doing wrong I would greatly appreciate it. Im sure it something very simple...

So I have a document from Komodo named tinyscrip.py (yes, i know that script is spelt incorrectly- it was intentional). This is the error im getting.

% python -i tinyscrip.py
    File "<stdin>", line 1
    % python -i tinyscrip.py
SyntaxError: invalid syntax
5 Years
Discussion Span
Last Post by napierin

python -i tinyscrip.py

I don't use komodo, but apparently you are typing in a python shell a command which should be typed in a terminal.


I did type the lines labled 1-5 in the terminal. I dont know why they came out numbered online.

Votes + Comments
??? No connection to posts

In principle, if you type exactly python -i tinyscrip.py in a terminal, it should work, provided tinyscrip.py is in the current working directory.

Edited by Gribouillis


I have a document called tinyscrip.py that I made in komodo and saved to my desktop.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.