HELP: input()

Hello there community,

I´m trying to use input (“Press enter to continue…”) in order to stop my script. But I get this error:

>>> input("")

Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
RuntimeError: input(): lost sys.stdin

I don´t know if there is another way to do that the script stops and then, when you press a button, continues…

Thanks :wink:

If you need user input, use operator properties or a property added to a panel and used by an operator.

If you want to stop a script, you might want to throw an exception.

input() doesn’t work in PyConsole, it sort of does in Text editor if a terminal window is opened. But it requires to switch windows and not very convenient. If there’s no command prompt, the process will hang forever.