@@ -32,14 +32,12 | |||||
32 | No newline at end of file |
|
32 | ||
33 | #Se verifica que la ruta exista y sea un directorio No newline at end of file |
|
33 | #Se verifica que la ruta exista y sea un directorio | |
34 | def dir_exists(var_dir, self): |
|
34 | def dir_exists(var_dir, self): | |
No newline at end of file |
|
35 | if os.path.isdir(var_dir): No newline at end of file | ||
35 | var_cmd="test -d "+str(var_dir) |
|
|||
No newline at end of file |
|
||||
36 | var_output=commands.getstatusoutput(var_cmd)[0] |
|
|||
No newline at end of file |
|
||||
37 | if var_output != 0: |
|
|||
No newline at end of file |
|
||||
38 | self.txtInfo.append("Ruta no valida, output_error:" + str(var_output)) |
|
|||
No newline at end of file |
|
||||
39 | return False |
|
|||
No newline at end of file |
|
||||
40 | else: No newline at end of file |
|
|||
41 | self.txtInfo.append("Ruta valida, sin error:" + str(var_dir)) No newline at end of file |
|
36 | self.txtInfo.append("Ruta valida, sin error:" + str(var_dir)) | |
42 | return True No newline at end of file |
|
37 | return True | |
|
38 | else: | |||
|
No newline at end of file | ||||
|
39 | self.txtInfo.append("Ruta no valida, output_error:" + str(var_dir)) | |||
|
No newline at end of file | ||||
|
40 | return False No newline at end of file | |||
43 | No newline at end of file |
|
41 | ||
44 | No newline at end of file |
|
42 | ||
45 | #Se buscan los archivos del tipo especificado No newline at end of file |
|
43 | #Se buscan los archivos del tipo especificado |
@@ -12,13 +12,9 | |||||
12 | """ No newline at end of file |
|
12 | """ | |
13 | Se usa para inicializar ciertos parametros para pruebas No newline at end of file |
|
13 | Se usa para inicializar ciertos parametros para pruebas | |
14 | """ |
|
14 | """ | |
No newline at end of file |
|
||||
15 | #self.txtDpath.setText('/home/ricardoar/optional/STORAGE/Data/RAW_EXP/JASMET/') |
|
|||
No newline at end of file |
|
||||
16 | #self.txtRpath.setText('/home/ricardoar/optional/STORAGE/prueba1_jro_backup_manager/') No newline at end of file |
|
|||
17 | self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS/') No newline at end of file |
|
15 | self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS/') | |
18 | self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager/') |
|
16 | self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager/') | |
No newline at end of file |
|
17 | self.txtElabel.setText('EW_DRIFTS_pruebas') No newline at end of file | ||
19 | self.txtElabel.setText('EW_DRIFTS') |
|
|||
No newline at end of file |
|
||||
20 | self.statusDpath = True |
|
|||
No newline at end of file |
|
||||
21 | self.statusRpath = True No newline at end of file |
|
|||
22 | self.lstDcapacity.setCurrentIndex(4) No newline at end of file |
|
18 | self.lstDcapacity.setCurrentIndex(4) | |
23 | self.txtDcapacity.setValue(250.0) No newline at end of file |
|
19 | self.txtDcapacity.setValue(250.0) | |
24 | self.txtDcapacity.setReadOnly(False) No newline at end of file |
|
20 | self.txtDcapacity.setReadOnly(False) |
@@ -30,50 +30,41 | |||||
30 | No newline at end of file |
|
30 | ||
31 | def setupUi2(self): No newline at end of file |
|
31 | def setupUi2(self): | |
32 |
|
32 | |||
No newline at end of file |
|
33 | functions2.detect_devices(self) #busca los dispositivos de grabacion | ||
33 | #sys.stdout = self |
|
No newline at end of file | ||
No newline at end of file |
|
34 | |||
34 |
|
No newline at end of file | |||
No newline at end of file |
|
35 | #Revisa si existe el archivo de confirguracion | ||
35 | var_tmp = os.path.isfile("parameters.conf") |
|
No newline at end of file | ||
No newline at end of file |
|
36 | if os.path.isfile("parameters.conf"): No newline at end of file | ||
36 |
|
||||
No newline at end of file |
|
||||
37 | if var_tmp == True: No newline at end of file |
|
|||
38 | self.txtInfo.append("Archivo de configuracion encontrado") No newline at end of file |
|
37 | self.txtInfo.append("Archivo de configuracion encontrado") | |
39 | functions2.get_parameters_conf(self) No newline at end of file |
|
38 | functions2.get_parameters_conf(self) | |
40 |
|
|
39 | else: | |
41 | else: No newline at end of file |
|
40 | self.txtInfo.append("Elija los parametros de configuracion") | |
42 | self.txtInfo.append("Elija los parametros de configuracion") |
|
41 | functions2.set_parameters(self) #Establece ciertos parametros, para pruebas | |
No newline at end of file |
|
||||
43 |
|
||||
No newline at end of file |
|
||||
44 | self.statusDpath = False |
|
|||
No newline at end of file |
|
||||
45 | self.statusRpath = False |
|
|||
No newline at end of file |
|
||||
46 | No newline at end of file |
|
|||
47 | functions2.set_parameters(self) #Establece ciertos parametros, para pruebas No newline at end of file |
|
42 | ||
48 |
|
43 | functions2.set_vars(self) #Carga las variables de la clase con los parametros seleccionados | ||
No newline at end of file |
|
44 | |||
49 | self.var_Dpath = self.txtDpath.text() |
|
No newline at end of file | ||
No newline at end of file |
|
45 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) | ||
50 | self.var_Rpath = self.txtRpath.text() |
|
No newline at end of file | ||
No newline at end of file |
|
46 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) | ||
51 | self.var_lstDtype = self.lstDtype.currentIndex() |
|
No newline at end of file | ||
No newline at end of file |
|
47 | No newline at end of file | ||
52 | self.var_Dtype = self.txtDtype.text() |
|
|||
No newline at end of file |
|
||||
53 | self.var_Elabel = self.txtElabel.text() |
|
|||
No newline at end of file |
|
||||
54 | self.var_Copys = self.txtCopys.value() |
|
|||
No newline at end of file |
|
||||
55 | self.var_lstDcapacity = self.lstDcapacity.currentIndex() |
|
|||
No newline at end of file |
|
||||
56 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
|||
57 | No newline at end of file |
|
48 | self.var_n_discs=0 | |
58 |
self.var_ |
|
49 | self.var_list=[] | |
59 | self.var_list=[] No newline at end of file |
|
50 | self.var_sublist=[] | |
60 | self.var_sublist=[] No newline at end of file |
|
51 | ||
61 |
|
52 | functions.load_days(self) | ||
No newline at end of file |
|
||||
62 | functions2.detect_devices(self) #busca los dispositivos de grabacion No newline at end of file |
|
|||
63 | functions.load_days(self) No newline at end of file |
|
53 | ||
64 | No newline at end of file |
|
54 | self.var_process = QtCore.QProcess() | |
65 | self.var_process = QtCore.QProcess() No newline at end of file |
|
55 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput) | |
66 |
self.connect(self.var_process, QtCore.SIGNAL('readyReadStandard |
|
56 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardError()'), self.readError) | |
67 |
self.connect(self.var_process, QtCore.SIGNAL(' |
|
57 | self.connect(self.var_process, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished) | |
No newline at end of file |
|
58 | No newline at end of file | ||
68 | self.connect(self.var_process, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished1) No newline at end of file |
|
|||
69 | No newline at end of file |
|
59 | def readOuput(self): | |
70 | def readOuput(self): |
|
60 | self.txtSburn.insertPlainText("stdout: " + QtCore.QString(self.var_process.readAllStandardOutput())) | |
No newline at end of file |
|
61 | |||
71 | self.txtSburn.append("stdout: " + QtCore.QString(self.var_process.readAllStandardOutput())) No newline at end of file |
|
No newline at end of file | ||
|
62 | No newline at end of file | |||
72 | No newline at end of file |
|
63 | def readError(self): | |
73 | def readError(self): |
|
64 | self.txtSburn.insertPlainText("stderr: " + QtCore.QString(self.var_process.readAllStandardError())) | |
No newline at end of file |
|
65 | |||
74 | self.txtSburn.append("stderr: " + QtCore.QString(self.var_process.readAllStandardError())) |
|
No newline at end of file | ||
No newline at end of file |
|
66 | |||
75 |
|
No newline at end of file | |||
No newline at end of file |
|
67 | def finished(self): | ||
76 | def finished1(self): No newline at end of file |
|
No newline at end of file | ||
|
68 | self.txtInfo.append("proceso terminado finished()") No newline at end of file | |||
77 | self.txtInfo.append("proceso terminado finished()") No newline at end of file |
|
69 | print self.var_process.exitCode() | |
78 | print self.var_process.exitCode() No newline at end of file |
|
70 | ||
79 | No newline at end of file |
|
71 |
General Comments 0
You need to be logged in to leave comments.
Login now