You are not logged in.
Hello everyone.
I'm trying build a pacman GUI using python language.
GUI -> glade
I'm with problems with the python/shell communication.
I tried popen and pexpect for to do communication, but seems that none of this worked.
I cant to use popen.communicate because popen.communicate finish the process instantly.
Now i'm trying use pexpect, but this isnt working.
Program should work something like this:
>pacman command -> "create new process" (python send the command to the terminal and it's created the "new process")
>while "new process" isnt dead {
>python capture the output from the "new process"
> "new process" should send to the python something that say "I WANT AN INPUT" -> this may not be necessary, i dont know :s
> (user write an input) python send the input to the "new process"
> "new process" should send signal that indicate that isnt dead
}
My qestions are:
There is anyway to do the communication like I said?
What should I do? i need advices.
Can i make it with python or any other language? what language? what modules?
HELP ME PLZ
sorry my bad english....
Thank you all
Offline
Look the "Interprocess Communication and Networking" chapter 17 of the Python Standard Library Reference:
http://docs.python.org/py3k/library/ipc.html
Maybe what you need is using a pipe to communicate with a subprocess.
Offline
Don't call pacman, use pyalpm
Also gtk has it's own functions for calling external processes and for ipc.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline