We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Execute python from Processing How to run python file from processing. I tried Launch() already. It doesn't do anything. Then i tried exec and process builder. both throw me back with "Unhandled exception type IOException". Any help ?
The default mode. Not p5.js.
This works when i wanted to open exe file. But I wanted to open a specific python file.
I have a python file when run will generate a txt file as output. So I want processing to execute the python file and I should see the txt file made
Just describing the problem (as most folks sadly do in this forum) isn't enough.
It should be accompanied by your runnable attempt as well! [-(
Calling another programming language from another 1 isn't always as easy peasy.
For example, take a look at this all big effort forum question to run Python from Processing: #:-S
Each ".py" file can have any of these demands below so it can successfully run: 8-X
Firstly my apologize for not being more descriptive. I will take a note and be more descriptive from next time. :)
Let me clarify one thing,
When I want to execute a python file, I just double click on it and it runs. I was hoping to the same process but with the support of java. The process to just execute the python file (In more simple words, I want java to do the double click for me)
This is my python file
f = open('Z.txt','w')
I got the IOException error removed.
The following processing code works but I dont know how to open a python file and execute it.
Process p =
//Process p = exec("C:/Windows/System32/notepad.exe");
int result = p.waitFor();
println("the process returned " + result);
catch (InterruptedException e)
If I try with
it doesnt work