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