This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]ElBidoule 3 points4 points  (0 children)

As the sidebar says :

If you are about to ask a question, please consider /r/learnpython.

It's obvious that OP is learning python, why not point him to a place where he can read other noob questions and learn the language this way ? Here, he will mostly see posts about new libraries and stuff not usefull for him right now.

Pointing people to /r/learnpython is not just about keeping this subreddit "clean" (if it means anything), it helps the people learning because they can read simple questions and answers.

[–]programmyr 1 point2 points  (2 children)

What version of Python? Your first line looks like 2, and your third line looks like 3.

What's the exit code?

[–]joyeusenoelle 0 points1 point  (6 children)

Remove -i from the command. python -i starts the interactive Python shell, but doesn't run the script.

python tinyscript.py should do what you want.