We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I just downloaded processing and installed python mode. I am running processing 3.3.5 on a Macbook Air (OS Sierra 10.13.6).
I'm trying to run a very basic code :
a=input()
print(a)
But it won't work I got the error:
processing.app.SketchException: EOFError: raw_input()
at jycessing.mode.run.SketchRunner.convertPythonSketchError(SketchRunner.java:248)
at jycessing.mode.run.SketchRunner.access$4(SketchRunner.java:227)
at jycessing.mode.run.SketchRunner$3.run(SketchRunner.java:122)
at java.lang.Thread.run(Thread.java:748)
What should I do please ?
Answers
Processing can't access inputs from the console unfortunately.
You're gonna need to use something like JOptionPane::showInputDialog() instead:
Besides WindowJS above, there's also this library Inputs, which is JOptionPane-based as well:
If you know how to, you can compile "Inputs.java" w/
javac
, and package it w/jar
.Otherwise, you're gonna need to convert that library as a Jython class. #:-S
I'm using a very rude swing InputDialog: