##// END OF EJS Templates
***
ralonso -
r6:7
parent child
Show More
1 NO CONTENT: new file 10644
NO CONTENT: new file 10644
@@ -0,0 +1,9
1 import sys
2 from subprocess import *
3
4 class BKmanager:
5 def __init__(self):
6
7
8 def buscar_cadena(self):
9
@@ -1,58 +1,65
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 """
3 """
4 Module implementing MainWindow.
4 Module implementing MainWindow.
5 """
5 """
6
6
7 from PyQt4.QtGui import QMainWindow
7 from PyQt4.QtGui import QMainWindow
8 from PyQt4.QtCore import pyqtSignature
8 from PyQt4.QtCore import pyqtSignature
9 from Ui_MainWindow import Ui_MainWindow
9 from Ui_MainWindow import Ui_MainWindow
10 from PyQt4 import QtGui
10 from PyQt4 import QtGui
11 from subprocess import *
11 from subprocess import *
12 import sys
13 import subprocess
12
14
13 class MainWindow(QMainWindow, Ui_MainWindow):
15 class MainWindow(QMainWindow, Ui_MainWindow):
14 """
16 """
15 Class documentation goes here.
17 Class documentation goes here.
16 """
18 """
17 def __init__(self, parent = None):
19 def __init__(self, parent = None):
18 """
20 """
19 Constructor
21 Constructor
20 """
22 """
21 QMainWindow.__init__(self, parent)
23 QMainWindow.__init__(self, parent)
22 self.setupUi(self)
24 self.setupUi(self)
23
25
24 @pyqtSignature("")
26 @pyqtSignature("")
25 def on_btnDpath_clicked(self):
27 def on_btnDpath_clicked(self):
26 """
28 """
27 Slot documentation goes here.
29 Slot documentation goes here.
28 """
30 """
29 self.Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
31 var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
30 self.txtDpath.setText(self.Dpath)
32 self.txtDpath.setText(var_Dpath)
31
33
32 # TODO: not implemented yet
34 # TODO: not implemented yet
33 # raise NotImplementedError
35 # raise NotImplementedError
34
36
35 @pyqtSignature("")
37 @pyqtSignature("")
36 def on_btnRpath_clicked(self):
38 def on_btnRpath_clicked(self):
37 """
39 """
38 Slot documentation goes here.
40 Slot documentation goes here.
39 """
41 """
40 filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
42 filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
41 self.txtRpath.setText(filename)
43 self.txtRpath.setText(filename)
42
44
43 # TODO: not implemented yet
45 # TODO: not implemented yet
44 # raise NotImplementedError
46 # raise NotImplementedError
45
47
46 @pyqtSignature("QString")
48 @pyqtSignature("")
47 def on_txtDpath_textChanged(self, p0):
49 def on_txtDpath_editingFinished(self):
48 """
50 """
49 Slot documentation goes here.
51 Slot documentation goes here.
50 """
52 """
51 p1= Popen(['find',self.Dpath,'-name','*.r'], stdout=PIPE)
53 var_Dpath=self.txtDpath.text()
52 p2= Popen(['awk','-F/','{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE)
54 p1= Popen(['find', var_Dpath, '-name', '*.r'], stdout=PIPE)
55 p2= Popen(['awk', '-F/', '{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE)
53 output_p2= p2.communicate()[0]
56 output_p2= p2.communicate()[0]
54 self.txtInfo.setText(output_p2)
57 #self.txtInfo.setText(output_p2)
55
58
56
59 var_list=[]
57 # TODO: not implemented yet
60 for i in range(0, len(output_p2)/8):
58 # raise NotImplementedError
61 var_list.append(output_p2[8*i:8*(i+1)-1])
62
63 for i in var_list:
64 # self.txtInfo.append(i)
65 self.lstStartDay.addItem(i)
General Comments 0
You need to be logged in to leave comments. Login now