-1

I have a MacBook air and have tried opening Python in terminal but when I open it, it opens Python interactive mode. Does anyone know how to open Python script mode please.

I’ve tried typing in things such as Python or Python 3 like safari suggests but that didn’t work.

3
  • that is opening the python repl which is a "proper" way to run a python shell. If you don't mean that, what do you mean e.g. IDLE? Commented Nov 1, 2022 at 0:25
  • How, exactly, do you "open" python? Type a command at a shell prompt? Click on an app in the dock? Some other way? Commented Nov 1, 2022 at 0:25
  • Not sure what you mean by "only accepts one line". Try running python in the command line, and there will be an interactive repl. If you want to run a python file run python path/to/file.py. Commented Nov 1, 2022 at 0:26

1 Answer 1

1

When you open the terminal, you need to type python or python3 and then press enter. After that, you are in the "python mode" and can use python commands.

If this also doesn't help you, you need to specify in more detail what youÄve done so far.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.