@@ -1,216 +1,216 | |||
|
1 | 1 | # -*- coding: utf-8 -*- No newline at end of file |
|
2 | 2 | No newline at end of file |
|
3 | 3 | #class BKmanager: No newline at end of file |
|
4 | 4 | # def __init__(self): No newline at end of file |
|
5 | 5 | No newline at end of file |
|
6 | 6 | from subprocess import * No newline at end of file |
|
7 | 7 | import sys No newline at end of file |
|
8 | 8 | import os No newline at end of file |
|
9 | 9 | import subprocess No newline at end of file |
|
10 | 10 | import commands No newline at end of file |
|
11 | 11 | No newline at end of file |
|
12 | 12 | No newline at end of file |
|
13 | 13 | #Entero a cadena agregando ceros delante No newline at end of file |
|
14 | 14 | def i2s(var_n, var_length=4): No newline at end of file |
|
15 | 15 | var_n2=str(var_n) No newline at end of file |
|
16 | 16 | while len(var_n2) < var_length: No newline at end of file |
|
17 | 17 | var_n2 = "0"+var_n2 No newline at end of file |
|
18 | 18 | return var_n2 No newline at end of file |
|
19 | 19 | No newline at end of file |
|
20 | 20 | No newline at end of file |
|
21 | 21 | #Crea directorios en la ruta indicada No newline at end of file |
|
22 | 22 | def make_dirs(list_dirs, self): No newline at end of file |
|
23 | 23 | var_cmd="mkdir -p "+str(self.var_Rpath) No newline at end of file |
|
24 | 24 | for var_dir in list_dirs: No newline at end of file |
|
25 | 25 | var_output=commands.getstatusoutput(var_cmd+'/'+var_dir)[0] No newline at end of file |
|
26 | 26 | if var_output != 0: No newline at end of file |
|
27 | 27 | self.txtInfo.append("Error al crear el directorio "+var_dir+", output_error:" + str(var_output)) No newline at end of file |
|
28 | 28 | return False No newline at end of file |
|
29 | 29 | self.txtInfo.append('Carpetas creadas correctamente') No newline at end of file |
|
30 | 30 | return True No newline at end of file |
|
31 | 31 | No newline at end of file |
|
32 | 32 | No newline at end of file |
|
33 | 33 | #Se verifica que la ruta exista y sea un directorio No newline at end of file |
|
34 | 34 | def dir_exists(var_dir, self): No newline at end of file |
|
35 | 35 | var_cmd="test -d "+str(var_dir) No newline at end of file |
|
36 | 36 | var_output=commands.getstatusoutput(var_cmd)[0] No newline at end of file |
|
37 | 37 | if var_output != 0: No newline at end of file |
|
38 | 38 | self.txtInfo.append("Ruta no valida, output_error:" + str(var_output)) No newline at end of file |
|
39 | 39 | return False No newline at end of file |
|
40 | 40 | else: No newline at end of file |
|
41 | 41 | self.txtInfo.append("Ruta valida, sin error:" + str(var_dir)) No newline at end of file |
|
42 | 42 | return True No newline at end of file |
|
43 | 43 | No newline at end of file |
|
44 | 44 | No newline at end of file |
|
45 | 45 | #Se buscan los archivos del tipo especificado No newline at end of file |
|
46 | 46 | def load_days(self): No newline at end of file |
|
47 | 47 | No newline at end of file |
|
48 | 48 | self.var_list=[] No newline at end of file |
|
49 | 49 | self.lstStartDay.clear() No newline at end of file |
|
50 | 50 | self.lstStopDay.clear() No newline at end of file |
|
51 | 51 | No newline at end of file |
|
52 | 52 | if self.statusDpath == False: No newline at end of file |
|
53 | 53 | self.btnGbkp.setEnabled(False) No newline at end of file |
|
54 | 54 | return No newline at end of file |
|
55 | 55 | No newline at end of file |
|
56 | 56 | if self.var_Dtype == '': No newline at end of file |
|
57 | 57 | return No newline at end of file |
|
58 | 58 | No newline at end of file |
|
59 | 59 | var_cmd="find " + str(self.var_Dpath) + " -name *."+ str(self.var_Dtype) +" | awk -F/ '{print substr($NF,2,7)}' | sort| uniq" No newline at end of file |
|
60 | 60 | output=commands.getstatusoutput(var_cmd)[1] No newline at end of file |
|
61 | 61 | No newline at end of file |
|
62 | 62 | #Si no se encuentra ningun archivo No newline at end of file |
|
63 | 63 | if len(output) == 0: No newline at end of file |
|
64 | 64 | self.txtInfo.append("No se encontraron archivos") No newline at end of file |
|
65 | 65 | self.btnGbkp.setEnabled(False) No newline at end of file |
|
66 | 66 | return No newline at end of file |
|
67 | 67 | No newline at end of file |
|
68 | 68 | #Se cargan las listas para seleccionar StartDay y StopDay (QComboBox) No newline at end of file |
|
69 | 69 | for i in range(0, (len(output)+1)/8): No newline at end of file |
|
70 | 70 | self.var_list.append(output[8*i:8*(i+1)-1]) No newline at end of file |
|
71 | 71 | No newline at end of file |
|
72 | 72 | for i in self.var_list: No newline at end of file |
|
73 | 73 | self.lstStartDay.addItem(i) No newline at end of file |
|
74 | 74 | self.lstStopDay.addItem(i) No newline at end of file |
|
75 | 75 | self.lstStopDay.setCurrentIndex(self.lstStartDay.count()-1) No newline at end of file |
|
76 | 76 | No newline at end of file |
|
77 | 77 | get_sub_list(self) No newline at end of file |
|
78 | 78 | self.btnGbkp.setEnabled(True) No newline at end of file |
|
79 | 79 | No newline at end of file |
|
80 | 80 | No newline at end of file |
|
81 | 81 | #Verifica que los parametros No newline at end of file |
|
82 | 82 | def validate_parameters(self): No newline at end of file |
|
83 | 83 | #Verifica que las rutas sean validas No newline at end of file |
|
84 | 84 | if self.statusRpath == False: No newline at end of file |
|
85 | 85 | self.txtInfo.append("Ruta de proyecto no valida") No newline at end of file |
|
86 | 86 | return False No newline at end of file |
|
87 | 87 | No newline at end of file |
|
88 | 88 | #Verifica la etiqueta No newline at end of file |
|
89 | 89 | if len(self.var_Elabel) == 0: No newline at end of file |
|
90 | 90 | self.txtInfo.append("Debe ingresar el nombre de la etiqueta") No newline at end of file |
|
91 | 91 | return False No newline at end of file |
|
92 | 92 | No newline at end of file |
|
93 | 93 | return True No newline at end of file |
|
94 | 94 | No newline at end of file |
|
95 | 95 | No newline at end of file |
|
96 | 96 | #Obtiene el rango de las fechas seleccionadas No newline at end of file |
|
97 | 97 | def get_sub_list(self): No newline at end of file |
|
98 | 98 | self.var_sublist=[] No newline at end of file |
|
99 | 99 | for i in self.var_list[self.lstStartDay.currentIndex():self.lstStartDay.currentIndex() + self.lstStopDay.currentIndex()+1]: No newline at end of file |
|
100 | 100 | self.var_sublist.append(i) No newline at end of file |
|
101 | 101 | if len(self.var_sublist) == 0: No newline at end of file |
|
102 | 102 | self.txtInfo.append("No existen archivos encontrados") No newline at end of file |
|
103 | 103 | No newline at end of file |
|
104 | 104 | No newline at end of file |
|
105 | 105 | #Busca los archivos con los parametros de busqueda No newline at end of file |
|
106 | 106 | def list_files(self): No newline at end of file |
|
107 | 107 | var_files_list=[] No newline at end of file |
|
108 | 108 | for var_doy in self.var_sublist: No newline at end of file |
|
109 | 109 | var_cmd="find " + str(self.var_Dpath) + " -name ?"+var_doy+"???."+ str(self.var_Dtype) + " |sort" No newline at end of file |
|
110 | 110 | var_output=commands.getstatusoutput(var_cmd)[1] No newline at end of file |
|
111 | 111 | for var_file in var_output.split(): No newline at end of file |
|
112 | 112 | var_files_list.append(var_file) #Almacena cada archivo en la lista No newline at end of file |
|
113 | 113 | return var_files_list No newline at end of file |
|
114 | 114 | No newline at end of file |
|
115 | 115 | No newline at end of file |
|
116 | 116 | #Genera la lista de archivos .dat que contienen los archivos a grabar en cada DVD No newline at end of file |
|
117 | 117 | def make_files_dat(var_files_list, self): No newline at end of file |
|
118 | 118 | var_Rpath_ppath=self.var_Rpath+"/ppath" #Ruta de los archivos a grabar No newline at end of file |
|
119 | 119 | var_n=1 #Numero del DVD actual No newline at end of file |
|
120 | 120 | var_tmp=0 #Se usa para acumular el tamaΓ±o de los archivos de la lista No newline at end of file |
|
121 | 121 | var_files_list_2=[] #Se usa para almacenar la lista de archivos agrbar en cada DVD No newline at end of file |
|
122 | 122 | No newline at end of file |
|
123 | 123 | for i in var_files_list: #Se asignan en i los archivos de la lista No newline at end of file |
|
124 | 124 | self.txtInfo.append(i) No newline at end of file |
|
125 | 125 | var_size_i=os.path.getsize(i)/1024+1 #tamaΓ±o en KB del archivo de la lista, se suma 1 KB para evitar problemas al momento de sumar No newline at end of file |
|
126 | 126 | var_tmp += var_size_i #Se acumulan el tamaΓ±o de los archivos de la lista No newline at end of file |
|
127 | 127 | No newline at end of file |
|
128 | 128 | #Si el tamaΓ±o acumulado es mayor que el de el DVD |
|
129 | No newline at end of file | |
|
129 | if var_tmp > self.var_Dcapacity: No newline at end of file | |
|
130 | 130 | var_tmp -= var_size_i #se quita el tamaΓ±o sumado para mostrar el tamaΓ±o real No newline at end of file |
|
131 | 131 | #se crea un archivo con numeral en el sufijo y extension .dat No newline at end of file |
|
132 | 132 | var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","w") No newline at end of file |
|
133 | 133 | #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat No newline at end of file |
|
134 | 134 | for line in var_files_list_2: No newline at end of file |
|
135 | 135 | var_tmp_path=(line.split(self.var_Dpath)[1]).split('/') No newline at end of file |
|
136 | 136 | var_tmp_path2="/" No newline at end of file |
|
137 | 137 | for l in range(0, len(var_tmp_path)-1): No newline at end of file |
|
138 | 138 | var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/" No newline at end of file |
|
139 | 139 | var_file.write(var_tmp_path2+'=') No newline at end of file |
|
140 | 140 | var_file.write(line+'\n') No newline at end of file |
|
141 | 141 | var_file.close() No newline at end of file |
|
142 | 142 | No newline at end of file |
|
143 | 143 | var_tmp = var_size_i #Se asigna a la variable el tamaΓ±o del archivo actual No newline at end of file |
|
144 | 144 | var_files_list_2=[] #Se reinicia la lista No newline at end of file |
|
145 | 145 | var_n += 1 No newline at end of file |
|
146 | 146 | var_files_list_2.append(i) No newline at end of file |
|
147 | 147 | No newline at end of file |
|
148 | 148 | #se crea un archivo con numeral en el sufijo y extension .dat No newline at end of file |
|
149 | 149 | var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","w") No newline at end of file |
|
150 | 150 | #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat No newline at end of file |
|
151 | 151 | for line in var_files_list_2: No newline at end of file |
|
152 | 152 | var_tmp_path=(line.split(self.var_Dpath)[1]).split('/') No newline at end of file |
|
153 | 153 | var_tmp_path2="/" No newline at end of file |
|
154 | 154 | for l in range(0, len(var_tmp_path)-1): No newline at end of file |
|
155 | 155 | var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/" No newline at end of file |
|
156 | 156 | var_file.write(var_tmp_path2+'=') No newline at end of file |
|
157 | 157 | var_file.write(line+'\n') No newline at end of file |
|
158 | 158 | var_file.close() No newline at end of file |
|
159 | 159 | No newline at end of file |
|
160 | 160 | return var_n No newline at end of file |
|
161 | 161 | No newline at end of file |
|
162 | 162 | No newline at end of file |
|
163 | 163 | #Genera los archivos .print con los cuales se creara los postscript No newline at end of file |
|
164 | 164 | def make_files_print(self): No newline at end of file |
|
165 | 165 | No newline at end of file |
|
166 | 166 | var_Rpath_ppath=self.var_Rpath+"/ppath" #Ruta de los archivos a grabar No newline at end of file |
|
167 | 167 | No newline at end of file |
|
168 | 168 | # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .print No newline at end of file |
|
169 | 169 | for var_n in range(1, self.var_n_discs + 1): No newline at end of file |
|
170 | 170 | #se abren los archivos .dat en modo lectura No newline at end of file |
|
171 | 171 | var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","r") No newline at end of file |
|
172 | 172 | lines=var_file.readlines() # Se lee las lineas en el archivo y se almacenan en la lista No newline at end of file |
|
173 | 173 | # Se crea el archivo .print No newline at end of file |
|
174 | 174 | var_file_print = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".print","w") No newline at end of file |
|
175 | 175 | var_file_print.write(self.var_Elabel+" "+i2s(var_n)+"/"+i2s(self.var_n_discs)+"\n") No newline at end of file |
|
176 | 176 | var_file_print.write("Year Doy Folder Set Time range\n") No newline at end of file |
|
177 | 177 | No newline at end of file |
|
178 | 178 | var_first_folder = lines[0].split('=')[0] No newline at end of file |
|
179 | 179 | var_first_file = (lines[0].split('=')[1])[:-1] No newline at end of file |
|
180 | 180 | var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1] No newline at end of file |
|
181 | 181 | No newline at end of file |
|
182 | 182 | for j in range(1, len(lines)-1): No newline at end of file |
|
183 | 183 | var_tmp_folder = lines[j].split('=')[0] No newline at end of file |
|
184 | 184 | var_tmp_file = (lines[j].split('=')[1])[:-1] No newline at end of file |
|
185 | 185 | No newline at end of file |
|
186 | 186 | # Si el subfolder superior o la fecha del archivo cambia se genera una nueva linea No newline at end of file |
|
187 | 187 | if (var_tmp_folder != var_first_folder) or (var_tmp_file[0:-5] != var_first_file[0:-5]): No newline at end of file |
|
188 | 188 | var_last_file = (lines[j-1].split('=')[1])[:-1] No newline at end of file |
|
189 | 189 | var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1] No newline at end of file |
|
190 | 190 | # Si el archivo se grabara directamente en la / del DVD y no en un /directorio/ No newline at end of file |
|
191 | 191 | # se usa la etiqueta para indicar la parte de la etiqueta donde va el subdirectorio No newline at end of file |
|
192 | 192 | if var_first_folder == '/': No newline at end of file |
|
193 | 193 | var_folder = self.var_Elabel No newline at end of file |
|
194 | 194 | else: No newline at end of file |
|
195 | 195 | var_folder = var_first_folder.split('/')[1] No newline at end of file |
|
196 | 196 | No newline at end of file |
|
197 | 197 | var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" " No newline at end of file |
|
198 | 198 | +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n") No newline at end of file |
|
199 | 199 | No newline at end of file |
|
200 | 200 | var_first_folder = lines[j].split('=')[0] No newline at end of file |
|
201 | 201 | var_first_file = (lines[j].split('=')[1])[:-1] No newline at end of file |
|
202 | 202 | var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1] No newline at end of file |
|
203 | 203 | No newline at end of file |
|
204 | 204 | var_last_file = (lines[-1].split('=')[1])[:-1] No newline at end of file |
|
205 | 205 | var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1] No newline at end of file |
|
206 | 206 | No newline at end of file |
|
207 | 207 | if var_first_folder == '/': No newline at end of file |
|
208 | 208 | var_folder = self.txtElabel.text() No newline at end of file |
|
209 | 209 | else: No newline at end of file |
|
210 | 210 | var_folder = var_first_folder.split('/')[1] No newline at end of file |
|
211 | 211 | No newline at end of file |
|
212 | 212 | var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" " No newline at end of file |
|
213 | 213 | +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n") No newline at end of file |
|
214 | 214 | No newline at end of file |
|
215 | 215 | var_file.close() No newline at end of file |
|
216 | 216 | var_file_print.close() No newline at end of file |
@@ -1,67 +1,103 | |||
|
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) No newline at end of file |
|
23 | 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 | def enabled_items1(var_bool, self): | |
|
No newline at end of file | ||
|
68 | self.tabParameters.setEnabled(not(var_bool)) | |
|
No newline at end of file | ||
|
69 | self.lstDcapacity.setEnabled(not(var_bool)) | |
|
No newline at end of file | ||
|
70 | self.txtDcapacity.setEnabled(not(var_bool)) | |
|
No newline at end of file | ||
|
71 | self.btnGbkp.setEnabled(not(var_bool)) | |
|
No newline at end of file | ||
|
72 | self.btnRestart.setEnabled(var_bool) | |
|
No newline at end of file | ||
|
73 | self.btnStartburn.setEnabled(var_bool) No newline at end of file | |
|
67 | 74 | No newline at end of file |
|
75 | def make_parameters_conf(self): | |
|
No newline at end of file | ||
|
76 | var_file = open("parameters.conf","w") | |
|
No newline at end of file | ||
|
77 | ||
|
No newline at end of file | ||
|
78 | var_file.write(self.var_Dpath+"\n") | |
|
No newline at end of file | ||
|
79 | var_file.write(self.var_Rpath+"\n") | |
|
No newline at end of file | ||
|
80 | var_file.write(str(self.var_lstDtype)+"\n") | |
|
No newline at end of file | ||
|
81 | var_file.write(self.var_Dtype+"\n") | |
|
No newline at end of file | ||
|
82 | var_file.write(self.var_Elabel+"\n") | |
|
No newline at end of file | ||
|
83 | var_file.write(str(self.var_Copys)+"\n") | |
|
No newline at end of file | ||
|
84 | var_file.write(str(self.var_lstDcapacity)+"\n") | |
|
No newline at end of file | ||
|
85 | var_file.write(str(self.var_Dcapacity)+"\n") | |
|
No newline at end of file | ||
|
86 | ||
|
No newline at end of file | ||
|
87 | var_file.close() | |
|
No newline at end of file | ||
|
88 | ||
|
No newline at end of file | ||
|
89 | ||
|
No newline at end of file | ||
|
90 | def get_parameters_conf(self): | |
|
No newline at end of file | ||
|
91 | var_file = open("parameters.conf","w") | |
|
No newline at end of file | ||
|
92 | ||
|
No newline at end of file | ||
|
93 | var_file.write(self.var_Dpath+"\n") | |
|
No newline at end of file | ||
|
94 | var_file.write(self.var_Rpath+"\n") | |
|
No newline at end of file | ||
|
95 | var_file.write(str(self.var_lstDtype)+"\n") | |
|
No newline at end of file | ||
|
96 | var_file.write(self.var_Dtype+"\n") | |
|
No newline at end of file | ||
|
97 | var_file.write(self.var_Elabel+"\n") | |
|
No newline at end of file | ||
|
98 | var_file.write(str(self.var_Copys)+"\n") | |
|
No newline at end of file | ||
|
99 | var_file.write(str(self.var_lstDcapacity)+"\n") | |
|
No newline at end of file | ||
|
100 | var_file.write(str(self.var_Dcapacity)+"\n") | |
|
No newline at end of file | ||
|
101 | ||
|
No newline at end of file | ||
|
102 | var_file.close() | |
|
No newline at end of file | ||
|
103 | No newline at end of file |
@@ -1,308 +1,312 | |||
|
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 Ui_MainWindow import Ui_MainWindow No newline at end of file |
|
10 | 10 | from PyQt4 import QtGui No newline at end of file |
|
11 | 11 | from subprocess import * No newline at end of file |
|
12 | 12 | import sys No newline at end of file |
|
13 | 13 | import os No newline at end of file |
|
14 | 14 | import subprocess No newline at end of file |
|
15 | 15 | import commands No newline at end of file |
|
16 | 16 | from functions import functions No newline at end of file |
|
17 | 17 | from functions import functions2 No newline at end of file |
|
18 | 18 | No newline at end of file |
|
19 | 19 | class MainWindow(QMainWindow, Ui_MainWindow): No newline at end of file |
|
20 | 20 | """ No newline at end of file |
|
21 | 21 | Class documentation goes here. No newline at end of file |
|
22 | 22 | """ No newline at end of file |
|
23 | 23 | No newline at end of file |
|
24 | 24 | def __init__(self, parent = None): No newline at end of file |
|
25 | 25 | QMainWindow.__init__(self, parent) No newline at end of file |
|
26 | 26 | self.setupUi(self) No newline at end of file |
|
27 | 27 | self.setupUi2() No newline at end of file |
|
28 | 28 | sys.stdout = self #redirige salida estandar No newline at end of file |
|
29 | 29 | No newline at end of file |
|
30 | 30 | def setupUi2(self): No newline at end of file |
|
31 | 31 | No newline at end of file |
|
32 | sys.stdout = self | |
|
No newline at end of file | ||
|
33 | ||
|
No newline at end of file | ||
|
34 | var_tmp = os.path.isfile("parameters.conf") | |
|
No newline at end of file | ||
|
35 | ||
|
No newline at end of file | ||
|
36 | if var_tmp == True: | |
|
No newline at end of file | ||
|
37 | self.txtInfo.append("Archivo de configuracion encontrado") | |
|
No newline at end of file | ||
|
38 | functions2.get_parameters_conf(self) | |
|
No newline at end of file | ||
|
39 | ||
|
No newline at end of file | ||
|
40 | else: | |
|
No newline at end of file | ||
|
41 | self.txtInfo.append("Elija los parametros de configuracion") | |
|
No newline at end of file | ||
|
42 | ||
|
No newline at end of file | ||
|
43 | # os.remove("parameters.conf") | |
|
No newline at end of file | ||
|
44 | No newline at end of file | |
|
32 | 45 | self.statusDpath = False No newline at end of file |
|
33 | 46 | self.statusRpath = False No newline at end of file |
|
34 | 47 | No newline at end of file |
|
35 | 48 | functions2.set_parameters(self) #Establece ciertos parametros, para pruebas No newline at end of file |
|
36 | 49 | No newline at end of file |
|
37 | 50 | self.var_Dpath = self.txtDpath.text() No newline at end of file |
|
38 | 51 | self.var_Rpath = self.txtRpath.text() No newline at end of file |
|
52 | self.var_lstDtype = self.lstDtype.currentIndex() No newline at end of file | |
|
39 | 53 | self.var_Dtype = self.txtDtype.text() No newline at end of file |
|
40 | 54 | self.var_Elabel = self.txtElabel.text() No newline at end of file |
|
41 | 55 | self.var_Copys = self.txtCopys.value() |
|
56 | No newline at end of file | |
|
42 | self.var_Dcapacity = self.txtDcapacity.value() * 1024 No newline at end of file | |
|
No newline at end of file | ||
|
57 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file | |
|
43 | 58 | No newline at end of file |
|
44 | 59 | self.var_n_discs=0 No newline at end of file |
|
45 | 60 | self.var_list=[] No newline at end of file |
|
46 | 61 | self.var_sublist=[] No newline at end of file |
|
47 | 62 | No newline at end of file |
|
48 | 63 | functions2.detect_devices(self) #busca los dispositivos de grabacion No newline at end of file |
|
49 | 64 | functions.load_days(self) No newline at end of file |
|
50 | 65 | No newline at end of file |
|
51 | 66 | No newline at end of file |
|
52 | 67 | No newline at end of file |
|
53 | 68 | def write(self, txt): No newline at end of file |
|
54 | 69 | """ No newline at end of file |
|
55 | 70 | Escribe la salida estandar eb txtInfo No newline at end of file |
|
56 | 71 | """ No newline at end of file |
|
57 | 72 | self.txtInfo.append(str(txt)) No newline at end of file |
|
58 | 73 | No newline at end of file |
|
59 | 74 | No newline at end of file |
|
60 | 75 | @pyqtSignature("") No newline at end of file |
|
61 | 76 | def on_btnDpath_clicked(self): No newline at end of file |
|
62 | 77 | """ No newline at end of file |
|
63 | 78 | Permite seleccionar graficamente el direcorio de los datos a grabar No newline at end of file |
|
64 | 79 | """ No newline at end of file |
|
65 | 80 | self.var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) No newline at end of file |
|
66 | 81 | self.txtDpath.setText(self.var_Dpath) No newline at end of file |
|
67 | 82 | self.on_txtDpath_editingFinished() #llamada a funcion No newline at end of file |
|
68 | 83 | No newline at end of file |
|
69 | 84 | No newline at end of file |
|
70 | 85 | @pyqtSignature("") No newline at end of file |
|
71 | 86 | def on_btnRpath_clicked(self): No newline at end of file |
|
72 | 87 | """ No newline at end of file |
|
73 | 88 | Permite seleccionar graficamente el direcorio del proyecto No newline at end of file |
|
74 | 89 | """ No newline at end of file |
|
75 | 90 | self.var_Rpath = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) No newline at end of file |
|
76 | 91 | self.txtRpath.setText(self.var_Rpath) No newline at end of file |
|
77 | 92 | self.on_txtRpath_editingFinished() #llamada a funcion No newline at end of file |
|
78 | 93 | No newline at end of file |
|
79 | 94 | No newline at end of file |
|
80 | 95 | @pyqtSignature("") No newline at end of file |
|
81 | 96 | def on_txtDpath_editingFinished(self): No newline at end of file |
|
82 | 97 | """ No newline at end of file |
|
83 | 98 | Permite buscar los archivos de extension seleccionada en la ruta de de datos No newline at end of file |
|
84 | 99 | y cargar los valores para el rango de tiempo a ser grabado No newline at end of file |
|
85 | 100 | """ No newline at end of file |
|
86 | 101 | self.var_Dpath=self.txtDpath.text() #Se carga la variable con la ruta recien editada No newline at end of file |
|
87 | 102 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) No newline at end of file |
|
88 | 103 | functions.load_days(self) No newline at end of file |
|
89 | 104 | No newline at end of file |
|
90 | 105 | No newline at end of file |
|
91 | 106 | @pyqtSignature("") No newline at end of file |
|
92 | 107 | def on_txtRpath_editingFinished(self): No newline at end of file |
|
93 | 108 | """ No newline at end of file |
|
94 | 109 | Valida la ruta del proyecto No newline at end of file |
|
95 | 110 | """ No newline at end of file |
|
96 | 111 | self.var_Rpath=self.txtRpath.text() #Se carga la variable con la ruta recien editada No newline at end of file |
|
97 | 112 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) No newline at end of file |
|
98 | 113 | No newline at end of file |
|
99 | 114 | No newline at end of file |
|
100 | 115 | @pyqtSignature("int") No newline at end of file |
|
101 | 116 | def on_lstDtype_activated(self, index): No newline at end of file |
|
102 | 117 | """ No newline at end of file |
|
103 | 118 | Permite elegir entre los tipos de archivos No newline at end of file |
|
104 | 119 | """ No newline at end of file |
|
105 | 120 | self.txtDtype.setReadOnly(True) No newline at end of file |
|
106 | 121 | if index == 0: No newline at end of file |
|
107 | 122 | var_type='r' No newline at end of file |
|
108 | 123 | elif index == 1: No newline at end of file |
|
109 | 124 | var_type='pdata' No newline at end of file |
|
110 | 125 | elif index == 2: No newline at end of file |
|
111 | 126 | var_type='sswma' No newline at end of file |
|
112 | 127 | else : No newline at end of file |
|
113 | 128 | var_type='' No newline at end of file |
|
114 | 129 | self.txtDtype.setReadOnly(False) No newline at end of file |
|
115 | 130 | No newline at end of file |
|
116 | 131 | self.txtDtype.setText(var_type) No newline at end of file |
|
117 | 132 | self.on_txtDtype_editingFinished() No newline at end of file |
|
118 | 133 | No newline at end of file |
|
119 | 134 | No newline at end of file |
|
120 | 135 | @pyqtSignature("") No newline at end of file |
|
121 | 136 | def on_txtDtype_editingFinished(self): No newline at end of file |
|
122 | 137 | self.var_Dtype=self.txtDtype.text() No newline at end of file |
|
123 | 138 | functions.load_days(self) #llamada a funcion No newline at end of file |
|
124 | 139 | No newline at end of file |
|
125 | 140 | No newline at end of file |
|
126 | 141 | @pyqtSignature("") No newline at end of file |
|
127 | 142 | def on_txtElabel_editingFinished(self): No newline at end of file |
|
128 | 143 | self.var_Elabel = self.txtElabel.text() No newline at end of file |
|
129 | 144 | No newline at end of file |
|
130 | 145 | No newline at end of file |
|
131 | 146 | @pyqtSignature("") No newline at end of file |
|
132 | 147 | def on_txtCopys_editingFinished(self): No newline at end of file |
|
133 | 148 | self.var_Copys = self.txtCopys.value() No newline at end of file |
|
134 | 149 | No newline at end of file |
|
135 | 150 | No newline at end of file |
|
136 | 151 | @pyqtSignature("") No newline at end of file |
|
137 | 152 | def on_txtDcapacity_editingFinished(self): |
|
153 | No newline at end of file | |
|
138 | self.var_Dcapacity = self.txtDcapacity.value() * 1024 #tamaΓ±o en KB No newline at end of file | |
|
139 | 154 | No newline at end of file |
|
140 | 155 | No newline at end of file |
|
141 | 156 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
142 | 157 | def on_lstStartDay_activated(self, index): No newline at end of file |
|
143 | 158 | """ No newline at end of file |
|
144 | 159 | Cambia la lista de opciones en lstStopDay No newline at end of file |
|
145 | 160 | """ No newline at end of file |
|
146 | 161 | var_StopDay_index=self.lstStopDay.count() - self.lstStopDay.currentIndex() No newline at end of file |
|
147 | 162 | self.lstStopDay.clear() No newline at end of file |
|
148 | 163 | No newline at end of file |
|
149 | 164 | for i in self.var_list[index:]: No newline at end of file |
|
150 | 165 | self.lstStopDay.addItem(i) No newline at end of file |
|
151 | 166 | No newline at end of file |
|
152 | 167 | self.lstStopDay.setCurrentIndex(self.lstStopDay.count() - var_StopDay_index) No newline at end of file |
|
153 | 168 | No newline at end of file |
|
154 | 169 | functions.get_sub_list(self) No newline at end of file |
|
155 | 170 | No newline at end of file |
|
156 | 171 | No newline at end of file |
|
157 | 172 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
158 | 173 | def on_lstStopDay_activated(self, index): No newline at end of file |
|
159 | 174 | """ No newline at end of file |
|
160 | 175 | Cambia la lista de opciones en lstStartDay No newline at end of file |
|
161 | 176 | """ No newline at end of file |
|
162 | 177 | var_StartDay_index=self.lstStartDay.currentIndex() No newline at end of file |
|
163 | 178 | var_end_index = self.lstStopDay.count() - index No newline at end of file |
|
164 | 179 | self.lstStartDay.clear() No newline at end of file |
|
165 | 180 | No newline at end of file |
|
166 | 181 | for i in self.var_list[:len(self.var_list) - var_end_index + 1]: No newline at end of file |
|
167 | 182 | self.lstStartDay.addItem(i) No newline at end of file |
|
168 | 183 | No newline at end of file |
|
169 | 184 | self.lstStartDay.setCurrentIndex(var_StartDay_index) No newline at end of file |
|
170 | 185 | No newline at end of file |
|
171 | 186 | functions.get_sub_list(self) No newline at end of file |
|
172 | 187 | No newline at end of file |
|
173 | 188 | No newline at end of file |
|
174 | 189 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
175 | 190 | def on_lstDcapacity_activated(self, index): No newline at end of file |
|
176 | 191 | """ No newline at end of file |
|
177 | 192 | Permite elegir el tamaΓ±o del disco No newline at end of file |
|
178 | 193 | """ No newline at end of file |
|
179 | 194 | if index == 0: No newline at end of file |
|
180 | 195 | var_size=25.0 No newline at end of file |
|
181 | 196 | elif index == 1: No newline at end of file |
|
182 | 197 | var_size=8.5 No newline at end of file |
|
183 | 198 | elif index == 2: No newline at end of file |
|
184 | 199 | var_size=4.7 No newline at end of file |
|
185 | 200 | elif index == 3: No newline at end of file |
|
186 | 201 | var_size=0.7 No newline at end of file |
|
187 | 202 | No newline at end of file |
|
188 | 203 | if index != 4: No newline at end of file |
|
189 | 204 | self.txtDcapacity.setValue(var_size*10**9/1024**2) No newline at end of file |
|
190 | 205 | self.txtDcapacity.setReadOnly(True) No newline at end of file |
|
191 | 206 | else: No newline at end of file |
|
192 | 207 | self.txtDcapacity.setValue(100.0) No newline at end of file |
|
193 | 208 | self.txtDcapacity.setReadOnly(False) No newline at end of file |
|
194 | 209 | |
|
210 | No newline at end of file | |
|
195 | self.var_Dcapacity = self.txtDcapacity.value() * 1024 #tamaΓ±o en KB No newline at end of file | |
|
196 | 211 | No newline at end of file |
|
197 | 212 | No newline at end of file |
|
198 | 213 | @pyqtSignature("") No newline at end of file |
|
199 | 214 | def on_btnGbkp_clicked(self): No newline at end of file |
|
200 | 215 | """ No newline at end of file |
|
201 | 216 | Cuando se presiona el boton btnGbkp No newline at end of file |
|
202 | 217 | """ No newline at end of file |
|
203 | 218 | No newline at end of file |
|
204 | 219 | if functions.validate_parameters(self) == False: No newline at end of file |
|
205 | 220 | return No newline at end of file |
|
206 | 221 | No newline at end of file |
|
207 | 222 | #Crea las carpetas en la ruta del proyecto y verifica que se crearon correctamente No newline at end of file |
|
208 | 223 | list_dirs=['gpath','iso','ppath'] No newline at end of file |
|
209 | 224 | bool_make_dirs = functions.make_dirs(list_dirs, self) No newline at end of file |
|
210 | 225 | if bool_make_dirs == False: No newline at end of file |
|
211 | 226 | return No newline at end of file |
|
212 | 227 | No newline at end of file |
|
213 | 228 | var_files_list = functions.list_files(self) #Se obtiene la lista de archivos a grabar No newline at end of file |
|
214 | 229 | self.var_n_discs = functions.make_files_dat(var_files_list, self) #Se crean los archivos .dat No newline at end of file |
|
215 | 230 | No newline at end of file |
|
216 | 231 |
functions.make_ |
|
232 | No newline at end of file | |
|
217 | ||
|
No newline at end of file | ||
|
233 | No newline at end of file | |
|
218 | #Se deshabilita el Tab Parameters y el boton btnGbkp | |
|
No newline at end of file | ||
|
234 | No newline at end of file | |
|
219 | self.tabParameters.setEnabled(False) | |
|
No newline at end of file | ||
|
235 | No newline at end of file | |
|
220 | self.lstDcapacity.setEnabled(False) | |
|
No newline at end of file | ||
|
221 | self.txtDcapacity.setEnabled(False) | |
|
No newline at end of file | ||
|
222 | self.btnGbkp.setEnabled(False) | |
|
No newline at end of file | ||
|
223 | self.btnRestart.setEnabled(True) | |
|
No newline at end of file | ||
|
224 | self.btnStartburn.setEnabled(True) | |
|
No newline at end of file | ||
|
225 | No newline at end of file | |
|
226 | 236 | No newline at end of file |
|
227 | 237 | @pyqtSignature("") No newline at end of file |
|
228 | 238 | def on_btnRestart_clicked(self): No newline at end of file |
|
229 | 239 | """ No newline at end of file |
|
230 | 240 | Permite que se puedan cambiar los parametros No newline at end of file |
|
231 | 241 | """ |
|
242 | No newline at end of file | |
|
232 | self.tabParameters.setEnabled(True) | |
|
No newline at end of file | ||
|
233 | self.lstDcapacity.setEnabled(True) | |
|
No newline at end of file | ||
|
234 | self.txtDcapacity.setEnabled(True) | |
|
No newline at end of file | ||
|
235 | self.btnGbkp.setEnabled(True) | |
|
No newline at end of file | ||
|
236 | self.btnRestart.setEnabled(False) | |
|
No newline at end of file | ||
|
237 | self.btnStartburn.setEnabled(False) No newline at end of file | |
|
238 | 243 | No newline at end of file |
|
239 | 244 | No newline at end of file |
|
240 | 245 | @pyqtSignature("") No newline at end of file |
|
241 | 246 | def on_btnStartburn_clicked(self): No newline at end of file |
|
242 | 247 | """ No newline at end of file |
|
243 | 248 | Se inicia el proceso de grabacion No newline at end of file |
|
244 | 249 | """ No newline at end of file |
|
245 | 250 |
self.btn |
|
246 | 251 |
self.btnSt |
|
247 | 252 | self.btnStopburn.setEnabled(True) No newline at end of file |
|
248 | 253 | No newline at end of file |
|
249 | 254 |
sys.std |
|
250 | 255 | #sys.stderr = self No newline at end of file |
|
251 | 256 | print "stdout_!!!" No newline at end of file |
|
252 | 257 | No newline at end of file |
|
253 | 258 | #Inicializando variables No newline at end of file |
|
254 | 259 |
var_Rpath_ |
|
255 | 260 | var_Rpath_iso=self.var_Rpath+"/iso" No newline at end of file |
|
256 | 261 | No newline at end of file |
|
257 | 262 | # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .ps No newline at end of file |
|
258 | 263 | for var_n in range(1, self.var_n_discs+1): No newline at end of file |
|
259 | 264 | self.txtInfo.append(str(var_n)) No newline at end of file |
|
260 | 265 |
file_ |
|
261 | 266 | file_dat=var_Rpath_ppath+"/"+self.var_Elabel+"_"+functions.i2s(var_n)+".dat" No newline at end of file |
|
262 | 267 | No newline at end of file |
|
263 | 268 | var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r ' No newline at end of file |
|
264 | 269 | var_cmd += ' -A '+self.var_Elabel+' -V '+self.var_Elabel No newline at end of file |
|
265 | 270 | var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso No newline at end of file |
|
266 | 271 | self.txtInfo.append(var_cmd) |
|
272 | No newline at end of file | |
|
267 | # | |
|
No newline at end of file | ||
|
273 | No newline at end of file | |
|
268 | # var_output=commands.getstatusoutput(str(var_cmd))[0] | |
|
No newline at end of file | ||
|
274 | No newline at end of file | |
|
269 | # self.txtInfo.append(str(var_output)) | |
|
No newline at end of file | ||
|
275 | No newline at end of file | |
|
270 | # No newline at end of file | |
|
271 | 276 | #os.system(str(var_cmd)) No newline at end of file |
|
272 | 277 | #p = subprocess.Popen(str('ls /'), shell=True, stdout=self) No newline at end of file |
|
273 | 278 | #os.waitpid(p.pid, 0) No newline at end of file |
|
274 | 279 | ####self.txtInfo.append(str(p.pid)) No newline at end of file |
|
275 | 280 | No newline at end of file |
|
276 | 281 | No newline at end of file |
|
277 | 282 | @pyqtSignature("") No newline at end of file |
|
278 | 283 | def on_btnStopburn_clicked(self): No newline at end of file |
|
279 | 284 | """ No newline at end of file |
|
280 | 285 | Slot documentation goes here. No newline at end of file |
|
281 | 286 | """ No newline at end of file |
|
282 | 287 |
self.btn |
|
283 | 288 |
self.btnSt |
|
284 | 289 | self.btnStopburn.setEnabled(False) No newline at end of file |
|
285 | 290 | No newline at end of file |
|
286 | 291 | @pyqtSignature("") No newline at end of file |
|
287 | 292 | def on_btnTdevA_clicked(self): No newline at end of file |
|
288 | 293 | var_dev = str(self.txtDeviceA.text()) No newline at end of file |
|
289 | 294 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
290 | 295 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
291 | 296 | No newline at end of file |
|
292 | 297 | @pyqtSignature("") No newline at end of file |
|
293 | 298 | def on_btnTdevB_clicked(self): No newline at end of file |
|
294 | 299 | var_dev = str(self.txtDeviceB.text()) No newline at end of file |
|
295 | 300 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
296 | 301 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
297 | 302 | No newline at end of file |
|
298 | 303 | @pyqtSignature("") No newline at end of file |
|
299 | 304 | def on_btnTdevC_clicked(self): No newline at end of file |
|
300 | 305 | var_dev = str(self.txtDeviceC.text()) No newline at end of file |
|
301 | 306 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
302 | 307 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
303 | 308 | No newline at end of file |
|
304 | 309 | @pyqtSignature("") No newline at end of file |
|
305 | 310 | def on_btnTdevD_clicked(self): No newline at end of file |
|
306 | 311 | var_dev = str(self.txtDeviceD.text()) No newline at end of file |
|
307 | 312 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
308 | 313 | commands.getstatusoutput(var_cmd) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now