473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

subprocess freeze with rsync on windows

Hi,

I try to call rsync (with ssh) with subprocess but _some times_ it
freeze without traceback, without any reason.

My code look like that :
def sh(self,cmd):
log.debug("S cmd: " + " ".join(cmd))
p = Popen(cmd, stdout = PIPE, stderr = PIPE)
stdout, stderr = p.communicate()
if stdout:
log.debug("S ret: %s" % stdout)
if stderr:
log.error("S err: %s" % stderr)
return p.returncode

When it freeze i need to kill the ms-dos console by hand.
I've no problem on linux with the same script.

thanks

the complet script (doing rsync and cp -al on the remote side) is
available freely here : http://flibuste.net/libre/snapy (but
documentation is in french)

--
William Dodé - http://flibuste.net
Apr 7 '06 #1
0 1178

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rasmusson, Lars | last post by:
Hi, I have a problem doing I/O in a python thread. I want a thread to execute a command using os.popen, read its input until the end, and then print 'DONE' and terminate. However, the...
4
by: Ivo Woltring | last post by:
Hi Pythoneers, I am trying to make my own gui for mencoder.exe (windows port of the terrific linux mencoder/mplayer) to convert divx to Pocket_PC size. My current app creates a batch script to...
2
by: nienfeng | last post by:
Hi, everyone I want to build rsync server that can run in linux and windows, and configure by python. So I'm looking for something like rsync for python. I find rsync.py and pysync. But rsync.py...
5
by: Grant Edwards | last post by:
I'm trying to use the py-gnuplot module on windows, and have been unable to get it to work reliably under Win2K and WinXP. By default, it uses popen(gnuplotcmd,'w'), but in some situations that...
4
by: ToxSox | last post by:
Hello. This is my first post here and i have a big problem with my script! One page (child.htm), was delivered not by me and i can't change it. This page calls a methode in a object of my page....
7
by: timw.google | last post by:
Hi I want to write a python script that runs rsync on a given directory and host. I build the command line string, but when I try to run subprocess.call(cmd), or p=subprocess.Popen(cmd,...
1
by: Steven Bethard | last post by:
I'm having trouble using the subprocess module on Windows when my command line includes special characters like "&" (ampersand):: .... stdout=subprocess.PIPE, .... ...
0
by: Amanda Jamin | last post by:
Subprocess issues with platform independence Postby ajamin on Wed Oct 08, 2008 10:46 am I am writing a python script that will act as a wrapper for another program. The python script will...
2
by: newlasdjfk | last post by:
I have read tons of posts but still can't seem to figure it out. I want to subprocess.Popen() rsync.exe in windows, and print the stdout in python. This works... import subprocess, time, os,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.