0

Possible Duplicate:
read subprocess stdout line by line

I'm creating my own Dropbox like serivice with small indicator applet for easy usage. I'm using rsync at first startup of the application and I want the indicator applet to have an item with whats going on about it.

So what I want, and need help with, is: how do I start a subprocess that dies when the application dies? How do I capture the ongoing output of the running subprocess?

My code is here.

I've tried this but it seems like they wont run:

rsyncRun = subprocess.Popen(["rsync","--stats","--progress","-azvv","-e","ssh", "LOCALDIR","REMOTEDIR", "--log-file=/home/daniel/.bareshare/bilderrsync.log"], shell=True, stdout=subprocess.PIPE)

lsyncdRun = subprocess.Popen(["lsyncd",lsyncdconfig], shell=True, stdout=subprocess.PIPE)
Community
  • 1
  • 1
Daniel Holm
  • 4,347
  • 3
  • 19
  • 27
  • If you search, you'll find that this question gets asked frequently. – S.Lott Jan 23 '12 at 10:44
  • I have, but I dont understand it. Giving it another go. – Daniel Holm Jan 24 '12 at 09:38
  • "I dont understand it". Vague and uninformative. Be **specific** about what you need to know. "it seems like they won't run". Vague and uninformative. We don't know **anything** about your problem from this description. – S.Lott Jan 24 '12 at 10:43

0 Answers0