##// END OF EJS Templates
***
ralonso -
r47:48
parent child
Show More
@@ -52,6 +52,9
52 if self.statusDpath == False:
52 if self.statusDpath == False:
53 self.btnGbkp.setEnabled(False)
53 self.btnGbkp.setEnabled(False)
54 return
54 return
55
56 if self.var_Dtype == '':
57 return
55
58
56 var_cmd="find " + str(self.var_Dpath) + " -name *."+ str(self.var_Dtype) +" | awk -F/ '{print substr($NF,2,7)}' | sort| uniq"
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]
60 output=commands.getstatusoutput(var_cmd)[1]
@@ -40,12 +40,14
40 self.var_Elabel = self.txtElabel.text()
40 self.var_Elabel = self.txtElabel.text()
41 self.var_Copys = self.txtCopys.value()
41 self.var_Copys = self.txtCopys.value()
42 self.var_Dcapacity = self.txtDcapacity.value() * 1024
42 self.var_Dcapacity = self.txtDcapacity.value() * 1024
43
43
44 self.var_n_discs=0
44 self.var_n_discs=0
45 self.var_list=[]
45 self.var_list=[]
46 self.var_sublist=[]
46 self.var_sublist=[]
47
47
48 functions2.detect_devices(self) #busca los dispositivos de grabacion
48 functions2.detect_devices(self) #busca los dispositivos de grabacion
49 functions.load_days(self)
50
49
51
50
52
51 def write(self, txt):
53 def write(self, txt):
@@ -100,23 +102,20
100 """
102 """
101 Permite elegir entre los tipos de archivos
103 Permite elegir entre los tipos de archivos
102 """
104 """
105 self.txtDtype.setReadOnly(True)
103 if index == 0:
106 if index == 0:
104 var_type='r'
107 var_type='r'
105 elif index == 1:
108 elif index == 1:
106 var_type='pdata'
109 var_type='pdata'
107 elif index == 2:
110 elif index == 2:
108 var_type='sswma'
111 var_type='sswma'
109
112 else :
110 if index != 3:
113 var_type=''
111 self.txtDtype.setText(var_type)
112 self.txtDtype.setReadOnly(True)
113 self.var_Dtype=self.txtDtype.text()
114 functions.load_days(self)
115
116 else:
117 self.txtDtype.setText('')
118 self.txtDtype.setReadOnly(False)
114 self.txtDtype.setReadOnly(False)
119
115
116 self.txtDtype.setText(var_type)
117 self.on_txtDtype_editingFinished()
118
120
119
121 @pyqtSignature("")
120 @pyqtSignature("")
122 def on_txtDtype_editingFinished(self):
121 def on_txtDtype_editingFinished(self):
@@ -247,33 +246,28
247 self.btnStartburn.setEnabled(False)
246 self.btnStartburn.setEnabled(False)
248 self.btnStopburn.setEnabled(True)
247 self.btnStopburn.setEnabled(True)
249
248
250 return
251
252 sys.stdout = self
249 sys.stdout = self
253 #sys.stderr = self
250 #sys.stderr = self
254 print "stdout_!!!"
251 print "stdout_!!!"
255
252
256 #Inicializando variables
253 #Inicializando variables
257 var_Rpath=self.txtRpath.text()
254 var_Rpath_ppath=self.var_Rpath+"/ppath"
258 var_Rpath_ppath=var_Rpath+"/ppath"
255 var_Rpath_iso=self.var_Rpath+"/iso"
259 var_Rpath_iso=var_Rpath+"/iso"
256
260 var_label=self.txtElabel.text()
261
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
263 for var_n in range(0, self.var_n_discs+1):
258 for var_n in range(1, self.var_n_discs+1):
264 print var_n
259 self.txtInfo.append(str(var_n))
265
266 file_iso=var_Rpath_iso+"/"+functions.i2s(var_n)+".iso"
260 file_iso=var_Rpath_iso+"/"+functions.i2s(var_n)+".iso"
267 file_dat=var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".dat"
261 file_dat=var_Rpath_ppath+"/"+self.var_Elabel+"_"+functions.i2s(var_n)+".dat"
268
262
269 var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r '
263 var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r '
270 var_cmd += ' -A '+var_label+' -V '+var_label
264 var_cmd += ' -A '+self.var_Elabel+' -V '+self.var_Elabel
271 var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso
265 var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso
272 self.txtInfo.append(var_cmd)
266 self.txtInfo.append(var_cmd)
273
267 #
274 var_output=commands.getstatusoutput(str(var_cmd))[0]
268 # var_output=commands.getstatusoutput(str(var_cmd))[0]
275 self.txtInfo.append(str(var_output))
269 # self.txtInfo.append(str(var_output))
276
270 #
277 #os.system(str(var_cmd))
271 #os.system(str(var_cmd))
278 #p = subprocess.Popen(str('ls /'), shell=True, stdout=self)
272 #p = subprocess.Popen(str('ls /'), shell=True, stdout=self)
279 #os.waitpid(p.pid, 0)
273 #os.waitpid(p.pid, 0)
@@ -312,5 +306,3
312 var_dev = str(self.txtDeviceD.text())
306 var_dev = str(self.txtDeviceD.text())
313 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
307 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
314 commands.getstatusoutput(var_cmd)
308 commands.getstatusoutput(var_cmd)
315
316
General Comments 0
You need to be logged in to leave comments. Login now