We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello everyone.. I've tried to run a processing sketch from terminal. Following are the steps on my terminal.
sh-006669-hp:~ saurabh.datta$ cd Documents
sh-006669-hp:Documents saurabh.datta$ ls
Arduino ffmpeg python_stuff
Microsoft User Data index.py test_py_page.py
Processing of_v0.8.4_osx_release trial_de_flask_uno.py
SimpleCV opencv-3.0.0-rc1
sh-006669-hp:Documents saurabh.datta$ cd Processing
sh-006669-hp:Processing saurabh.datta$ ls
iteration_101 modes templates
libraries rekog_101 tools
sh-006669-hp:Processing saurabh.datta$ cd iteration_101
sh-006669-hp:iteration_101 saurabh.datta$ ls
data rekog_101
iteration_101.pde sketch.properties
sh-006669-hp:iteration_101 saurabh.datta$ mkdir outputDir
sh-006669-hp:iteration_101 saurabh.datta$ ls
data outputDir sketch.properties
iteration_101.pde rekog_101
sh-006669-hp:iteration_101 saurabh.datta$ processing-java --run --force --output="./outputDir" --sketch="../iteration_101"
../iteration_101 does not exist.
My sketch's name is iteration_101.pde. As you can see I've even made a output folder.. But is unable to run it..
I don't have any clue what's happening?
Answers
Why
../iteration_101
? You are in this folder already, you must not go up.I tried it.. here's the output
/iteration_102
doesn't work either, as you indicate a folder on the root of your disk. Try./iteration_102
Thanks #PhiLho. (But still no luck) let me state you my condition: I'm in my Processisng sketch book folder
167:processing saurabh.datta$ ls libraries simple_server templates tools modes sketches themeChange
And I want to run the simple_server sketch. So next I got into the dir167:processing saurabh.datta$ cd simple_server 167:simple_server saurabh.datta$ ls simple_server.pde sketch.properties
after that I tried to run and again I got this
167:simple_server saurabh.datta$ processing-java --run --force -- output=/outPutDir --sketch=./simple_server ./simple_server does not exist.
alternatively I came a step out of the simple_server dir and again tried this.
167:simple_server saurabh.datta$ cd .. 167:processing saurabh.datta$ processing-java --run --force --output=/simple_server/outPutDir --sketch=./simple_server ./simple_server does not exist.
Since now you know the tree, can you help me write the terminal command?
Hard to tell, but from the sketch folder (the one where you see the simple_server folder), you can try the command:
processing-java --run --force --output=./outPutDir --sketch=./simple_server
Note the ./ before outPutDir, as /outPutDir is probably wrong too.
[EDIT] I tried on my Windows computer, and got the same error... Apparently, Processing doesn't like relative paths, it wants absolute paths.
Didn't work:
167:~ saurabh.datta$ cd Documents/processing 167:processing saurabh.datta$ processing-java --run --force --output=./outPutDir --sketch=./simple_server ./simple_server does not exist.
See my remark in the [EDIT] section...
Sorry to ask this idiotic question: so you mean not
./simple_server
but/Macintosh HD/Users/saurabh.datta/Documents/simple_server
?Should be
/Macintosh HD/Users/saurabh.datta/Documents/Processing/simple_server
or something like that, no? If I followed correctly the previous messages.But, yes, something like that. Have you tried?
Yeah tried. No sucess. I mean when you log in terminal on mac(I'm not a n avid mac user as well), It directly load as from the user as
167:~ saurabh.datta$
.Why the processing wiki doesn't have a proper example on that. Not the help is of actual help..
I don't understand your sentence. Go inside your sketch folder, type the
pwd
command. It should give you the absolute path of your sketch. Copy this path and use it in the command line. You must have an absolute path for the output dir as well. You can make it /tmp perhaps.Works so here's what I did:
`173:~ saurabh.datta$ cd Documents
173:Documents saurabh.datta$ ls
Arduino of_v0.8.4_osx_release FFMPEG during installation info.rtf opencv-3.0.0-rc1 Microsoft User Data python_stuff Processing servo_dimensions.jpg index.py test_py_page.py iphone5blueprints.jpg trial_de_flask_uno.py
173:Documents saurabh.datta$ cd processing
173:processing saurabh.datta$ ls
aYearInCode-glitch.zip simple_server themeChange libraries sketches tools modes templates
173:processing saurabh.datta$ cd simple_server
173:simple_server saurabh.datta$ ls
outPutDir simple_server.pde sketch.properties
173:simple_server saurabh.datta$ pwd
/Users/saurabh.datta/Documents/processing/simple_server
173:simple_server saurabh.datta$ cd\
Listening for transport dt_socket at address: 8220 Finished. 173:~ saurabh.datta$ `
here's a gif that I just made for people to see the steps: s17.postimg.org/8xx5gfakf/running_Processing_From_Terminal.gif