Forum Archive

Run command in console? Return key adds new line

console

How do you run a command on the console interactive prompt?

Pressing return adds a new line.

ccc

https://omz-software.com/pythonista/docs/ios/pythonista.html#pythonista-interactive-prompt

cvp

@console said:

Pressing return adds a new line.

Right, it adds the command you have typed in the console, preceded by ">>>".
But it also runs your command.
Example: type as command "print(1)"

ccc

@cvp said:

Example: type as command "print(1)"

print() is not needed in the console…

Example: type as command "1 + 1"

cvp

@ccc said:

print() is not needed in the console…

You're right as usual, buT if you want to try your statements before to include them in a script 🙄 (ma mauvaise foi)

console

Sorry everyone! The commands weren’t running because a script was running. Commands run if I stop the script and press return.