@@ -1,104 +1,104 | |||
|
1 | 1 | # -*- coding: utf-8 -*- No newline at end of file |
|
2 | 2 | No newline at end of file |
|
3 | 3 | No newline at end of file |
|
4 | 4 | from subprocess import * No newline at end of file |
|
5 | 5 | import sys No newline at end of file |
|
6 | 6 | import os No newline at end of file |
|
7 | 7 | import subprocess No newline at end of file |
|
8 | 8 | import commands No newline at end of file |
|
9 | 9 | No newline at end of file |
|
10 | 10 | No newline at end of file |
|
11 | 11 | def set_parameters(self): No newline at end of file |
|
12 | 12 | """ No newline at end of file |
|
13 | 13 | Se usa para inicializar ciertos parametros para pruebas No newline at end of file |
|
14 | 14 | """ No newline at end of file |
|
15 | 15 | #self.txtDpath.setText('/home/ricardoar/optional/STORAGE/Data/RAW_EXP/JASMET/') No newline at end of file |
|
16 | 16 | #self.txtRpath.setText('/home/ricardoar/optional/STORAGE/prueba1_jro_backup_manager/') No newline at end of file |
|
17 | 17 | self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS/') No newline at end of file |
|
18 | 18 | self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager/') No newline at end of file |
|
19 | 19 | self.txtElabel.setText('EW_DRIFTS') No newline at end of file |
|
20 | 20 | self.statusDpath = True No newline at end of file |
|
21 | 21 | self.statusRpath = True No newline at end of file |
|
22 | 22 | self.lstDcapacity.setCurrentIndex(4) |
|
23 | No newline at end of file | |
|
23 | self.txtDcapacity.setValue(100.0) No newline at end of file | |
|
24 | 24 | self.txtDcapacity.setReadOnly(False) No newline at end of file |
|
25 | 25 | No newline at end of file |
|
26 | 26 | No newline at end of file |
|
27 | 27 | def detect_devices(self): No newline at end of file |
|
28 | 28 | """ No newline at end of file |
|
29 | 29 | Deteccion de los dispositvos de grabacion No newline at end of file |
|
30 | 30 | """ No newline at end of file |
|
31 | 31 | #var_cmd="wodim --devices | grep /dev/ | awk -F\' '{print $2}'" #Funciona en consola pero no en python ΒΏ? No newline at end of file |
|
32 | 32 | var_cmd="wodim --devices | grep /dev/ | awk '{print $2}' | awk -F= '{print $2}'" No newline at end of file |
|
33 | 33 | var_output = commands.getstatusoutput(var_cmd) No newline at end of file |
|
34 | 34 | if var_output[0] != 0: No newline at end of file |
|
35 | 35 | self.txtInfo.append("No se pudo encontrar los dispositivos de grabacion, output_error:" + str(var_output)) No newline at end of file |
|
36 | 36 | else: No newline at end of file |
|
37 | 37 | self.txtInfo.append("dispositivos encontrados") No newline at end of file |
|
38 | 38 | var_devices = var_output[1].split('\n') No newline at end of file |
|
39 | 39 | No newline at end of file |
|
40 | 40 | var_tmp=[] No newline at end of file |
|
41 | 41 | for i in range(0, 4): No newline at end of file |
|
42 | 42 | if i < len(var_devices): No newline at end of file |
|
43 | 43 | var_len = len(var_devices[i]) No newline at end of file |
|
44 | 44 | var_tmp.append(var_devices[i][1:var_len - 1]) No newline at end of file |
|
45 | 45 | else: No newline at end of file |
|
46 | 46 | var_tmp.append('') No newline at end of file |
|
47 | 47 | No newline at end of file |
|
48 | 48 | #Se escriben los dispostivos correspodientes, si existen No newline at end of file |
|
49 | 49 | self.txtDeviceA.setText(str(var_tmp[0])) No newline at end of file |
|
50 | 50 | self.txtDeviceB.setText(str(var_tmp[1])) No newline at end of file |
|
51 | 51 | self.txtDeviceC.setText(str(var_tmp[2])) No newline at end of file |
|
52 | 52 | self.txtDeviceD.setText(str(var_tmp[3])) No newline at end of file |
|
53 | 53 | #Se desactivan los que no existen No newline at end of file |
|
54 | 54 | if len(var_tmp[0]) == 0 : No newline at end of file |
|
55 | 55 | self.chkDevA.setChecked(False) No newline at end of file |
|
56 | 56 | self.chkDevA.setEnabled(False) No newline at end of file |
|
57 | 57 | if len(var_tmp[1]) == 0 : No newline at end of file |
|
58 | 58 | self.chkDevB.setChecked(False) No newline at end of file |
|
59 | 59 | self.chkDevB.setEnabled(False) No newline at end of file |
|
60 | 60 | if len(var_tmp[2]) == 0 : No newline at end of file |
|
61 | 61 | self.chkDevC.setChecked(False) No newline at end of file |
|
62 | 62 | self.chkDevC.setEnabled(False) No newline at end of file |
|
63 | 63 | if len(var_tmp[3]) == 0 : No newline at end of file |
|
64 | 64 | self.chkDevD.setChecked(False) No newline at end of file |
|
65 | 65 | self.chkDevD.setEnabled(False) No newline at end of file |
|
66 | 66 | No newline at end of file |
|
67 | 67 | def enabled_items1(var_bool, self): No newline at end of file |
|
68 | 68 | self.tabParameters.setEnabled(not(var_bool)) No newline at end of file |
|
69 | 69 | self.lstDcapacity.setEnabled(not(var_bool)) No newline at end of file |
|
70 | 70 | self.txtDcapacity.setEnabled(not(var_bool)) No newline at end of file |
|
71 | 71 | self.btnGbkp.setEnabled(not(var_bool)) No newline at end of file |
|
72 | 72 | self.btnRestart.setEnabled(var_bool) No newline at end of file |
|
73 | 73 | self.btnStartburn.setEnabled(var_bool) No newline at end of file |
|
74 | 74 | No newline at end of file |
|
75 | 75 | def make_parameters_conf(self): No newline at end of file |
|
76 | 76 | var_file = open("parameters.conf","w") No newline at end of file |
|
77 | 77 | No newline at end of file |
|
78 | 78 | var_file.write(self.var_Dpath+"\n") #0 No newline at end of file |
|
79 | 79 | var_file.write(self.var_Rpath+"\n") #1 No newline at end of file |
|
80 | 80 | var_file.write(str(self.var_lstDtype)+"\n") #2 No newline at end of file |
|
81 | 81 | var_file.write(self.var_Dtype+"\n") #3 No newline at end of file |
|
82 | 82 | var_file.write(self.var_Elabel+"\n") #4 No newline at end of file |
|
83 | 83 | var_file.write(str(self.var_Copys)+"\n") #5 No newline at end of file |
|
84 | 84 | var_file.write(str(self.var_lstDcapacity)+"\n") #6 No newline at end of file |
|
85 | 85 | var_file.write(str(self.var_Dcapacity)+"\n") #7 No newline at end of file |
|
86 | 86 | No newline at end of file |
|
87 | 87 | var_file.close() No newline at end of file |
|
88 | 88 | No newline at end of file |
|
89 | 89 | No newline at end of file |
|
90 | 90 | def get_parameters_conf(self): No newline at end of file |
|
91 | 91 | var_file = open("parameters.conf","r") No newline at end of file |
|
92 | 92 | lines = var_file.readlines() No newline at end of file |
|
93 | 93 | No newline at end of file |
|
94 | 94 | self.txtDpath.setText(lines[0][:-1]) #0 No newline at end of file |
|
95 | 95 | self.txtRpath.setText(lines[1][:-1]) #1 No newline at end of file |
|
96 | 96 | self.lstDtype.setCurrentIndex(int(lines[2])) #2 No newline at end of file |
|
97 | 97 | self.txtDtype.setText(lines[3][:-1]) #3 No newline at end of file |
|
98 | 98 | self.txtElabel.setText(lines[4][:-1]) #4 No newline at end of file |
|
99 | 99 | self.txtCopys.setValue(int(lines[5][:-1])) #5 No newline at end of file |
|
100 | 100 | self.lstDcapacity.setCurrentIndex(int(lines[6])) #6 No newline at end of file |
|
101 | 101 | self.txtDcapacity.setValue(float(lines[7])) No newline at end of file |
|
102 | 102 | No newline at end of file |
|
103 | 103 | var_file.close() No newline at end of file |
|
104 | 104 | No newline at end of file |
@@ -1,332 +1,336 | |||
|
1 | 1 | # -*- coding: utf-8 -*- No newline at end of file |
|
2 | 2 | No newline at end of file |
|
3 | 3 | """ No newline at end of file |
|
4 | 4 | Module implementing MainWindow. No newline at end of file |
|
5 | 5 | """ No newline at end of file |
|
6 | 6 | No newline at end of file |
|
7 | 7 | from PyQt4.QtGui import QMainWindow No newline at end of file |
|
8 | 8 | from PyQt4.QtCore import pyqtSignature No newline at end of file |
|
9 | 9 | from PyQt4 import QtCore No newline at end of file |
|
10 | 10 | from Ui_MainWindow import Ui_MainWindow No newline at end of file |
|
11 | 11 | from PyQt4 import QtGui No newline at end of file |
|
12 | 12 | from subprocess import * No newline at end of file |
|
13 | 13 | import sys No newline at end of file |
|
14 | 14 | import os No newline at end of file |
|
15 | 15 | import subprocess No newline at end of file |
|
16 | 16 | import commands No newline at end of file |
|
17 | 17 | from functions import functions No newline at end of file |
|
18 | 18 | from functions import functions2 No newline at end of file |
|
19 | 19 | No newline at end of file |
|
20 | 20 | class MainWindow(QMainWindow, Ui_MainWindow): No newline at end of file |
|
21 | 21 | """ No newline at end of file |
|
22 | 22 | Class documentation goes here. No newline at end of file |
|
23 | 23 | """ No newline at end of file |
|
24 | 24 | No newline at end of file |
|
25 | 25 | def __init__(self, parent = None): No newline at end of file |
|
26 | 26 | QMainWindow.__init__(self, parent) No newline at end of file |
|
27 | 27 | self.setupUi(self) No newline at end of file |
|
28 | 28 | self.setupUi2() No newline at end of file |
|
29 | 29 | #sys.stdout = self #redirige salida estandar No newline at end of file |
|
30 | 30 | No newline at end of file |
|
31 | 31 | def setupUi2(self): No newline at end of file |
|
32 | 32 | No newline at end of file |
|
33 | 33 | #sys.stdout = self No newline at end of file |
|
34 | 34 | No newline at end of file |
|
35 | 35 | var_tmp = os.path.isfile("parameters.conf") No newline at end of file |
|
36 | 36 | No newline at end of file |
|
37 | 37 | if var_tmp == True: No newline at end of file |
|
38 | 38 | self.txtInfo.append("Archivo de configuracion encontrado") No newline at end of file |
|
39 | 39 | functions2.get_parameters_conf(self) No newline at end of file |
|
40 | 40 | No newline at end of file |
|
41 | 41 | else: No newline at end of file |
|
42 | 42 | self.txtInfo.append("Elija los parametros de configuracion") No newline at end of file |
|
43 | 43 | No newline at end of file |
|
44 | 44 | self.statusDpath = False No newline at end of file |
|
45 | 45 | self.statusRpath = False No newline at end of file |
|
46 | 46 | No newline at end of file |
|
47 | 47 | functions2.set_parameters(self) #Establece ciertos parametros, para pruebas No newline at end of file |
|
48 | 48 | No newline at end of file |
|
49 | 49 | self.var_Dpath = self.txtDpath.text() No newline at end of file |
|
50 | 50 | self.var_Rpath = self.txtRpath.text() No newline at end of file |
|
51 | 51 | self.var_lstDtype = self.lstDtype.currentIndex() No newline at end of file |
|
52 | 52 | self.var_Dtype = self.txtDtype.text() No newline at end of file |
|
53 | 53 | self.var_Elabel = self.txtElabel.text() No newline at end of file |
|
54 | 54 | self.var_Copys = self.txtCopys.value() No newline at end of file |
|
55 | 55 | self.var_lstDcapacity = self.lstDcapacity.currentIndex() No newline at end of file |
|
56 | 56 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
57 | 57 | No newline at end of file |
|
58 | 58 | self.var_n_discs=0 No newline at end of file |
|
59 | 59 | self.var_list=[] No newline at end of file |
|
60 | 60 | self.var_sublist=[] No newline at end of file |
|
61 | 61 | No newline at end of file |
|
62 | 62 | functions2.detect_devices(self) #busca los dispositivos de grabacion No newline at end of file |
|
63 | 63 | functions.load_days(self) No newline at end of file |
|
64 | 64 | No newline at end of file |
|
65 | 65 | self.var_process = QtCore.QProcess() No newline at end of file |
|
66 | 66 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput) No newline at end of file |
|
67 | 67 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardError()'), self.readError) 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 | |
|
68 | 69 | No newline at end of file |
|
69 | 70 | def readOuput(self): |
|
71 | No newline at end of file | |
|
70 | self.txtSburn.append(QtCore.QString(self.var_process.readAllStandardOutput())) No newline at end of file | |
|
71 | 72 | No newline at end of file |
|
72 | 73 | def readError(self): |
|
74 | No newline at end of file | |
|
73 | self.txtSburn.append(QtCore.QString(self.var_process.readAllStandardError())) No newline at end of file | |
|
No newline at end of file | ||
|
75 | ||
|
No newline at end of file | ||
|
76 | def finished1(self): | |
|
No newline at end of file | ||
|
77 | self.txtInfo.append("proceso terminado finished()") | |
|
No newline at end of file | ||
|
78 | print self.var_process.exitCode() No newline at end of file | |
|
74 | 79 | No newline at end of file |
|
75 | 80 | def write(self, txt): |
|
No newline at end of file | ||
|
76 | """ | |
|
No newline at end of file | ||
|
77 | Escribe la salida estandar eb txtInfo | |
|
No newline at end of file | ||
|
78 | """ No newline at end of file | |
|
79 | 81 | self.txtInfo.append(str(txt)) No newline at end of file |
|
80 | 82 | No newline at end of file |
|
81 | 83 | No newline at end of file |
|
82 | 84 | @pyqtSignature("") No newline at end of file |
|
83 | 85 | def on_btnDpath_clicked(self): No newline at end of file |
|
84 | 86 | """ No newline at end of file |
|
85 | 87 | Permite seleccionar graficamente el direcorio de los datos a grabar No newline at end of file |
|
86 | 88 | """ No newline at end of file |
|
87 | 89 | self.var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) No newline at end of file |
|
88 | 90 | self.txtDpath.setText(self.var_Dpath) No newline at end of file |
|
89 | 91 | self.on_txtDpath_editingFinished() #llamada a funcion No newline at end of file |
|
90 | 92 | No newline at end of file |
|
91 | 93 | No newline at end of file |
|
92 | 94 | @pyqtSignature("") No newline at end of file |
|
93 | 95 | def on_btnRpath_clicked(self): No newline at end of file |
|
94 | 96 | """ No newline at end of file |
|
95 | 97 | Permite seleccionar graficamente el direcorio del proyecto No newline at end of file |
|
96 | 98 | """ No newline at end of file |
|
97 | 99 | self.var_Rpath = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) No newline at end of file |
|
98 | 100 | self.txtRpath.setText(self.var_Rpath) No newline at end of file |
|
99 | 101 | self.on_txtRpath_editingFinished() #llamada a funcion No newline at end of file |
|
100 | 102 | No newline at end of file |
|
101 | 103 | No newline at end of file |
|
102 | 104 | @pyqtSignature("") No newline at end of file |
|
103 | 105 | def on_txtDpath_editingFinished(self): No newline at end of file |
|
104 | 106 | """ No newline at end of file |
|
105 | 107 | Permite buscar los archivos de extension seleccionada en la ruta de de datos No newline at end of file |
|
106 | 108 | y cargar los valores para el rango de tiempo a ser grabado No newline at end of file |
|
107 | 109 | """ No newline at end of file |
|
108 | 110 | self.var_Dpath=self.txtDpath.text() #Se carga la variable con la ruta recien editada No newline at end of file |
|
109 | 111 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) No newline at end of file |
|
110 | 112 | functions.load_days(self) No newline at end of file |
|
111 | 113 | No newline at end of file |
|
112 | 114 | No newline at end of file |
|
113 | 115 | @pyqtSignature("") No newline at end of file |
|
114 | 116 | def on_txtRpath_editingFinished(self): No newline at end of file |
|
115 | 117 | """ No newline at end of file |
|
116 | 118 | Valida la ruta del proyecto No newline at end of file |
|
117 | 119 | """ No newline at end of file |
|
118 | 120 | self.var_Rpath=self.txtRpath.text() #Se carga la variable con la ruta recien editada No newline at end of file |
|
119 | 121 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) No newline at end of file |
|
120 | 122 | No newline at end of file |
|
121 | 123 | No newline at end of file |
|
122 | 124 | @pyqtSignature("int") No newline at end of file |
|
123 | 125 | def on_lstDtype_activated(self, index): No newline at end of file |
|
124 | 126 | """ No newline at end of file |
|
125 | 127 | Permite elegir entre los tipos de archivos No newline at end of file |
|
126 | 128 | """ No newline at end of file |
|
127 | 129 | self.txtDtype.setReadOnly(True) No newline at end of file |
|
128 | 130 | if index == 0: No newline at end of file |
|
129 | 131 | var_type='r' No newline at end of file |
|
130 | 132 | elif index == 1: No newline at end of file |
|
131 | 133 | var_type='pdata' No newline at end of file |
|
132 | 134 | elif index == 2: No newline at end of file |
|
133 | 135 | var_type='sswma' No newline at end of file |
|
134 | 136 | else : No newline at end of file |
|
135 | 137 | var_type='' No newline at end of file |
|
136 | 138 | self.txtDtype.setReadOnly(False) No newline at end of file |
|
137 | 139 | No newline at end of file |
|
138 | 140 | self.txtDtype.setText(var_type) No newline at end of file |
|
139 | 141 | self.on_txtDtype_editingFinished() No newline at end of file |
|
140 | 142 | No newline at end of file |
|
141 | 143 | No newline at end of file |
|
142 | 144 | @pyqtSignature("") No newline at end of file |
|
143 | 145 | def on_txtDtype_editingFinished(self): No newline at end of file |
|
144 | 146 | self.var_Dtype=self.txtDtype.text() No newline at end of file |
|
145 | 147 | functions.load_days(self) #llamada a funcion No newline at end of file |
|
146 | 148 | No newline at end of file |
|
147 | 149 | No newline at end of file |
|
148 | 150 | @pyqtSignature("") No newline at end of file |
|
149 | 151 | def on_txtElabel_editingFinished(self): No newline at end of file |
|
150 | 152 | self.var_Elabel = self.txtElabel.text() No newline at end of file |
|
151 | 153 | No newline at end of file |
|
152 | 154 | No newline at end of file |
|
153 | 155 | @pyqtSignature("") No newline at end of file |
|
154 | 156 | def on_txtCopys_editingFinished(self): No newline at end of file |
|
155 | 157 | self.var_Copys = self.txtCopys.value() No newline at end of file |
|
156 | 158 | No newline at end of file |
|
157 | 159 | No newline at end of file |
|
158 | 160 | @pyqtSignature("") No newline at end of file |
|
159 | 161 | def on_txtDcapacity_editingFinished(self): No newline at end of file |
|
160 | 162 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
161 | 163 | No newline at end of file |
|
162 | 164 | No newline at end of file |
|
163 | 165 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
164 | 166 | def on_lstStartDay_activated(self, index): No newline at end of file |
|
165 | 167 | """ No newline at end of file |
|
166 | 168 | Cambia la lista de opciones en lstStopDay No newline at end of file |
|
167 | 169 | """ No newline at end of file |
|
168 | 170 | var_StopDay_index=self.lstStopDay.count() - self.lstStopDay.currentIndex() No newline at end of file |
|
169 | 171 | self.lstStopDay.clear() No newline at end of file |
|
170 | 172 | No newline at end of file |
|
171 | 173 | for i in self.var_list[index:]: No newline at end of file |
|
172 | 174 | self.lstStopDay.addItem(i) No newline at end of file |
|
173 | 175 | No newline at end of file |
|
174 | 176 | self.lstStopDay.setCurrentIndex(self.lstStopDay.count() - var_StopDay_index) No newline at end of file |
|
175 | 177 | No newline at end of file |
|
176 | 178 | functions.get_sub_list(self) No newline at end of file |
|
177 | 179 | No newline at end of file |
|
178 | 180 | No newline at end of file |
|
179 | 181 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
180 | 182 | def on_lstStopDay_activated(self, index): No newline at end of file |
|
181 | 183 | """ No newline at end of file |
|
182 | 184 | Cambia la lista de opciones en lstStartDay No newline at end of file |
|
183 | 185 | """ No newline at end of file |
|
184 | 186 | var_StartDay_index=self.lstStartDay.currentIndex() No newline at end of file |
|
185 | 187 | var_end_index = self.lstStopDay.count() - index No newline at end of file |
|
186 | 188 | self.lstStartDay.clear() No newline at end of file |
|
187 | 189 | No newline at end of file |
|
188 | 190 | for i in self.var_list[:len(self.var_list) - var_end_index + 1]: No newline at end of file |
|
189 | 191 | self.lstStartDay.addItem(i) No newline at end of file |
|
190 | 192 | No newline at end of file |
|
191 | 193 | self.lstStartDay.setCurrentIndex(var_StartDay_index) No newline at end of file |
|
192 | 194 | No newline at end of file |
|
193 | 195 | functions.get_sub_list(self) No newline at end of file |
|
194 | 196 | No newline at end of file |
|
195 | 197 | No newline at end of file |
|
196 | 198 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
197 | 199 | def on_lstDcapacity_activated(self, index): No newline at end of file |
|
198 | 200 | """ No newline at end of file |
|
199 | 201 | Permite elegir el tamaΓ±o del disco No newline at end of file |
|
200 | 202 | """ No newline at end of file |
|
201 | 203 | if index == 0: No newline at end of file |
|
202 | 204 | var_size=25.0 No newline at end of file |
|
203 | 205 | elif index == 1: No newline at end of file |
|
204 | 206 | var_size=8.5 No newline at end of file |
|
205 | 207 | elif index == 2: No newline at end of file |
|
206 | 208 | var_size=4.7 No newline at end of file |
|
207 | 209 | elif index == 3: No newline at end of file |
|
208 | 210 | var_size=0.7 No newline at end of file |
|
209 | 211 | No newline at end of file |
|
210 | 212 | if index != 4: No newline at end of file |
|
211 | 213 | self.txtDcapacity.setValue(var_size*10**9/1024**2) No newline at end of file |
|
212 | 214 | self.txtDcapacity.setReadOnly(True) No newline at end of file |
|
213 | 215 | else: No newline at end of file |
|
214 | 216 | self.txtDcapacity.setValue(100.0) No newline at end of file |
|
215 | 217 | self.txtDcapacity.setReadOnly(False) No newline at end of file |
|
216 | 218 | No newline at end of file |
|
217 | 219 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
218 | 220 | No newline at end of file |
|
219 | 221 | No newline at end of file |
|
220 | 222 | @pyqtSignature("") No newline at end of file |
|
221 | 223 | def on_btnGbkp_clicked(self): No newline at end of file |
|
222 | 224 | """ No newline at end of file |
|
223 | 225 | Cuando se presiona el boton btnGbkp No newline at end of file |
|
224 | 226 | """ No newline at end of file |
|
225 | 227 | No newline at end of file |
|
226 | 228 | if functions.validate_parameters(self) == False: No newline at end of file |
|
227 | 229 | return No newline at end of file |
|
228 | 230 | No newline at end of file |
|
229 | 231 | #Crea las carpetas en la ruta del proyecto y verifica que se crearon correctamente No newline at end of file |
|
230 | 232 | list_dirs=['gpath','iso','ppath'] No newline at end of file |
|
231 | 233 | bool_make_dirs = functions.make_dirs(list_dirs, self) No newline at end of file |
|
232 | 234 | if bool_make_dirs == False: No newline at end of file |
|
233 | 235 | return No newline at end of file |
|
234 | 236 | No newline at end of file |
|
235 | 237 | var_files_list = functions.list_files(self) #Se obtiene la lista de archivos a grabar No newline at end of file |
|
236 | 238 | self.var_n_discs = functions.make_files_dat(var_files_list, self) #Se crean los archivos .dat No newline at end of file |
|
237 | 239 | functions.make_files_print(self) # Se crean los archivos .print No newline at end of file |
|
238 | 240 | functions2.make_parameters_conf(self) # se crea el archivo parameters.conf No newline at end of file |
|
239 | 241 | No newline at end of file |
|
240 | 242 | #Se deshabilitan los parametros de configuracion No newline at end of file |
|
241 | 243 | functions2.enabled_items1(True, self) No newline at end of file |
|
242 | 244 | No newline at end of file |
|
243 | 245 | @pyqtSignature("") No newline at end of file |
|
244 | 246 | def on_btnRestart_clicked(self): No newline at end of file |
|
245 | 247 | """ No newline at end of file |
|
246 | 248 | Permite que se puedan cambiar los parametros No newline at end of file |
|
247 | 249 | """ No newline at end of file |
|
248 | 250 | functions2.enabled_items1(False, self) No newline at end of file |
|
249 | 251 | os.remove("parameters.conf") No newline at end of file |
|
250 | 252 | No newline at end of file |
|
251 | 253 | No newline at end of file |
|
252 | 254 | @pyqtSignature("") No newline at end of file |
|
253 | 255 | def on_btnStartburn_clicked(self): No newline at end of file |
|
254 | 256 | """ No newline at end of file |
|
255 | 257 | Se inicia el proceso de grabacion No newline at end of file |
|
256 | 258 | """ No newline at end of file |
|
257 | 259 | self.btnRestart.setEnabled(False) No newline at end of file |
|
258 | 260 | self.btnStartburn.setEnabled(False) No newline at end of file |
|
259 | 261 | self.btnStopburn.setEnabled(True) No newline at end of file |
|
260 | 262 | No newline at end of file |
|
261 | 263 | sys.stdout = self No newline at end of file |
|
262 | 264 | #sys.stderr = self No newline at end of file |
|
263 | 265 | print "stdout_!!!" No newline at end of file |
|
264 | 266 | No newline at end of file |
|
265 | 267 | #Inicializando variables No newline at end of file |
|
266 | 268 | var_Rpath_ppath=self.var_Rpath+"/ppath" No newline at end of file |
|
267 | 269 | var_Rpath_iso=self.var_Rpath+"/iso" No newline at end of file |
|
268 | 270 | No newline at end of file |
|
269 | 271 | var_n=1 No newline at end of file |
|
270 | 272 | file_iso=var_Rpath_iso+"/"+functions.i2s(var_n)+".iso" No newline at end of file |
|
271 | 273 | file_dat=var_Rpath_ppath+"/"+self.var_Elabel+"_"+functions.i2s(var_n)+".dat" No newline at end of file |
|
272 | 274 | No newline at end of file |
|
273 | 275 | var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r ' No newline at end of file |
|
274 | 276 | var_cmd += ' -A '+self.var_Elabel+' -V '+self.var_Elabel No newline at end of file |
|
275 | 277 | var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso No newline at end of file |
|
276 | 278 | No newline at end of file |
|
277 | 279 | # self.process.start(var_cmd) No newline at end of file |
|
278 | 280 | self.var_process.start(var_cmd) No newline at end of file |
|
281 | # self.var_process.waitForFinished() | |
|
No newline at end of file | ||
|
282 | self.txtInfo.append("ejecutandose") No newline at end of file | |
|
279 | 283 | No newline at end of file |
|
280 | 284 | No newline at end of file |
|
281 | 285 | # # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .ps No newline at end of file |
|
282 | 286 | # for var_n in range(1, self.var_n_discs+1): No newline at end of file |
|
283 | 287 | # self.txtInfo.append(str(var_n)) No newline at end of file |
|
284 | 288 | # file_iso=var_Rpath_iso+"/"+functions.i2s(var_n)+".iso" No newline at end of file |
|
285 | 289 | # file_dat=var_Rpath_ppath+"/"+self.var_Elabel+"_"+functions.i2s(var_n)+".dat" No newline at end of file |
|
286 | 290 | # No newline at end of file |
|
287 | 291 | # var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r ' No newline at end of file |
|
288 | 292 | # var_cmd += ' -A '+self.var_Elabel+' -V '+self.var_Elabel No newline at end of file |
|
289 | 293 | # var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso No newline at end of file |
|
290 | 294 | # self.txtInfo.append(var_cmd) No newline at end of file |
|
291 | 295 | # No newline at end of file |
|
292 | 296 | # var_output=commands.getstatusoutput(str(var_cmd))[0] No newline at end of file |
|
293 | 297 | # self.txtInfo.append(str(var_output)) No newline at end of file |
|
294 | 298 | No newline at end of file |
|
295 | 299 | #os.system(str(var_cmd)) No newline at end of file |
|
296 | 300 | #p = subprocess.Popen(str('ls /'), shell=True, stdout=self) No newline at end of file |
|
297 | 301 | #os.waitpid(p.pid, 0) No newline at end of file |
|
298 | 302 | ####self.txtInfo.append(str(p.pid)) No newline at end of file |
|
299 | 303 | No newline at end of file |
|
300 | 304 | No newline at end of file |
|
301 | 305 | @pyqtSignature("") No newline at end of file |
|
302 | 306 | def on_btnStopburn_clicked(self): No newline at end of file |
|
303 | 307 | """ No newline at end of file |
|
304 | 308 | Slot documentation goes here. No newline at end of file |
|
305 | 309 | """ No newline at end of file |
|
306 | 310 | self.btnRestart.setEnabled(True) No newline at end of file |
|
307 | 311 | self.btnStartburn.setEnabled(True) No newline at end of file |
|
308 | 312 | self.btnStopburn.setEnabled(False) No newline at end of file |
|
309 | 313 | No newline at end of file |
|
310 | 314 | @pyqtSignature("") No newline at end of file |
|
311 | 315 | def on_btnTdevA_clicked(self): No newline at end of file |
|
312 | 316 | var_dev = str(self.txtDeviceA.text()) No newline at end of file |
|
313 | 317 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
314 | 318 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
315 | 319 | No newline at end of file |
|
316 | 320 | @pyqtSignature("") No newline at end of file |
|
317 | 321 | def on_btnTdevB_clicked(self): No newline at end of file |
|
318 | 322 | var_dev = str(self.txtDeviceB.text()) No newline at end of file |
|
319 | 323 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
320 | 324 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
321 | 325 | No newline at end of file |
|
322 | 326 | @pyqtSignature("") No newline at end of file |
|
323 | 327 | def on_btnTdevC_clicked(self): No newline at end of file |
|
324 | 328 | var_dev = str(self.txtDeviceC.text()) No newline at end of file |
|
325 | 329 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
326 | 330 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
327 | 331 | No newline at end of file |
|
328 | 332 | @pyqtSignature("") No newline at end of file |
|
329 | 333 | def on_btnTdevD_clicked(self): No newline at end of file |
|
330 | 334 | var_dev = str(self.txtDeviceD.text()) No newline at end of file |
|
331 | 335 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
332 | 336 | commands.getstatusoutput(var_cmd) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now