0
所以這是一個基本的客戶端服務器套接字程序。客戶端將文件發送到服務器,服務器使用gedit打開它。如何檢查文本文件是否在gedit中打開
p = subprocess.Popen("gedit file", shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
我想要的代碼像
while file_open in gedit:
wait()
after file_closed and saved
send to client
可能重複的[Python:檢查文件被鎖定](http://stackoverflow.com/questions/13371444/python-check-file-is-locked) – CarlosCarucce