We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › linux standard input
Page Index Toggle Pages: 1
linux standard input (Read 320 times)
linux standard input
Jan 21st, 2009, 8:10pm
 
Hi All,

Is there a library for reading text data from Linux standard input / output?  
I am trying to get real-time input to Processing from a C program running on the same machine as Processing.  OS is Linux.

Thanks,
F
Re: linux standard input
Reply #1 - Jan 21st, 2009, 11:34pm
 
System.in is an InputStream, you can read it to get the info. You get the data with a pipe
Re: linux standard input
Reply #2 - Jan 21st, 2009, 11:39pm
 
Yes, I can use a pipe I think.  Are there examples of System.in used from pipes in Processing?
Re: linux standard input
Reply #3 - Jan 21st, 2009, 11:49pm
 
Mmm, if you use the Search on System.in, you will find a few examples but they look unsuccessful. Not sure it can work, because Processing is essentially a GUI program, these doesn't mix well with such input... I can be wrong, though, I haven't tried. You would need to export the sketch and pipe to the Java process running the jar, I think.

If you have control on what the C program does, it should be more reliable to use sockets, for example.
Page Index Toggle Pages: 1