Paul Malherbe <[EMAIL PROTECTED]> writes: > Thanks for you input, it has really helped me!!
Glad I could help. > What I was trying to do was write an event script which would raise the > client which received focus. > > I have done it but the response is slow (acceptable), however I have had > to write a bash script calling a python script as my bash is not very good. > Could you maybe help me simplify it by using only one (python) script? Take a look at http://www.nowan.org/wmii/, if you want. My (python) wmiirc is there, as well as modwmii.py. In modwmii.py I have this (Popen is from subprocess, in python 2.4): class wmii_event(Popen): def read(self): return string.rstrip(self.stdout.readline()) def close(self): # If wmii is exiting the wmiir process may already be dead. if not self.poll(): os.kill(self.pid, signal.SIGTERM) return(self.wait()) So you could do (again, PIPE is from subprocess): events = wmii_event(("wmiir", "read", "/event"), stdout = PIPE) And loop with events.read(). -- Jeremy Hankins <[EMAIL PROTECTED]> PGP fingerprint: 748F 4D16 538E 75D6 8333 9E10 D212 B5ED 37D0 0A03 _______________________________________________ [email protected] mailing list http://wmii.de/cgi-bin/mailman/listinfo/wmii
