есть процедура
def file_to_archive(path_7zip, archive_name, file_to_archive):
command = [path_7zip, 'a', archive_name, file_to_archive ]
#CreationFlag = win32process.NORMAL_PRIORITY_CLASS
CreationFlag = win32process.NORMAL_PRIORITY_CLASS
#CreationFlag = win32process.BELOW_NORMAL_PRIORITY_CLASS
try:
#ProcessZipBackup = subprocess.call(command, shell=True)
ProcessZipBackup = subprocess.Popen(command, shell=True, \
stdout=subprocess.PIPE,
creationflags = CreationFlag)
print u'запущено архивирование файлов'
ErrorExecZip = ProcessZipBackup.wait()
except:
print sys.exc_info()
err_message = 'Возникла ошибка создания бакапа %s из %s'%( archive_name,\
file_to_archive)
print(":-( %s")%command
print ErrorExecZip
return(False)
else:
#print ErrorExecZip
print(":-)%s")%command
print ErrorExecZip
return(True)
ErrorExecZip = ProcessZipBackup.wait()