jeinarsson / josync

josync.readthedocs.org
MIT License
0 stars 0 forks source link

Make compatible with pythonw #25

Closed joelgoop closed 10 years ago

joelgoop commented 10 years ago

To be able to schedule to run in background, the easiest solution appears to be to run with pythonw. However, it currently fails without any exceptions being logged, probably due to writing to stdout. In josync, stdout communications come from logging and from the subprocess call to rsync

jeinarsson commented 10 years ago

This seems to require absolutely no stdout. Move to 2.0 and different handling of rsync output?

joelgoop commented 10 years ago

But it's easy to turn off output from the rsync call by just piping it. Parsing or logging it in real time is more difficult. Maybe we can check somehow if stdout exists and just pipe it (and also turn off the console handler for logging) if it doesn't?

jeinarsson commented 10 years ago

Go for it! :)

joelgoop commented 10 years ago

All subprocess calls now pipes stdout, stderr and stdin in order to be compatible with pythonw.