Open schuelaw opened 9 years ago
If I'm not wrong, what you are looking for is this: https://github.com/jdf/processing.py#processingpy
The precise link. Note that on Windows, it would be e.g.
processing-py.bat foo.pyde
although I use the following (rather brittle) .cmd file:
javaw -Xmx1024m -jar "%~dp0\processing-py.jar" "%~1"
as processing-py.cmd foo.pyde
I'm not sure if this has changed since the release of Processing v3 with Python Mode, but I'm not sure where to get processing-py.jar; it's nowhere to be found in the ./modes/PythonMode/
folder found in my processing_sketchbook folder.
Once Python mode is installed, what's the recommended way to run my .pyde file from from the command line? (I've confirmed that processing-java still doesn't work...)
@jsundram Have you found a solution? I'm stuck with this same problem when trying to build my sketch from Sublime Text with a build system... :'(
Have you tried tildebyte's suggestion above? I never did. Like you, I would love to break away from the processing editor and, in my case, use vim to edit and run sketches. Whenever I'm forced to use a text editor other than vim, I feel like an amputee. After using vim for 24 years, it is like an extension of my body. :)
Some things have changed in P5/P5Py 3+, among them, the standalone hasn't really been tested, so you're in virgin territory ;)
Yeah, I just poked around in the python mode directory and there are now several jar files. No idea how to slap them together to do a command-line run.
Apparently this will be fixed soonish?
https://forum.processing.org/two/discussion/15361/#Comment_64949
Anyone who's after a quick fix can apply the attached patch in their Processing directory patch.txt
Is there a way to run python mode from CLI yet?
@atoav -- I got this to work:
java -jar processing-py.jar sketch.py
I have followed all the steps outlined in http://py.processing.org/tutorials/command-line/, however, I keep getting the following error message:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/Users/vivek/Documents/GitHub/Coding-PyTrain/Keys/processing-py.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
@v715 I have exactly the same issue. I think you can ignore the warnings, the main problem is that the application just won't start up. A Java applet briefly appears in the dock but then instantly disappears. That's when the QuitHandler error prints in my case.
Same for me
Is there a solution to this problem? It works on my PC, but when I try to do this on Mac OS Mojave 10.14.4 I get the same warnings mentioned above along with this message: java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
I've just encountered this problem while trying to launch a sketch from CodeRunner.
processing-py.jar
and processing-py-natives-macosx-universal.jar
are in the sketch directory, and the run command is: java -jar processing-py.jar $filename
As in v715's post above, the error message is:
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.python.core.PySystemState (PATH/TO/processing-py.jar) to method java.io.Console.encoding() WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
With a regular processing sketch, one can launch from the command line using something like:
processing-java --sketch=Conway --output=/tmp/Conway --run
This doesn't work when the sketch was created in python mode. Is there a workaround?