Re: How to do screenshot in Linux?

new topic     » goto parent     » topic index » view thread      » older message » newer message
SocIoDim said...

Do I understand correctly that I have to use temporary files? I was hoping that the Euphoria allows me to work in the style of piping. Something similar to this:

sequence MySystemIs = stdout_of(system_exec("uname")) -- MySystemIs = "Linux"

Euphoria does indeed have Pipe Input/Output. You just have to use pipeio:exec() instead of system_exec().

include std/pipeio.e 
 
function stdout_of( sequence command ) 
 
    sequence data = {} 
 
    object p = pipeio:exec( command, pipeio:create() ) 
    object buff = pipeio:read( p[STDOUT], 256 ) 
 
    while sequence(buff) and length(buff) do 
        data &= buff 
        buff = pipeio:read( p[STDOUT], 256 ) 
    end while 
 
    return data 
end function 
 
sequence MySystemIs = stdout_of( "uname" ) 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu