|
@@
-1,58
+1,65
|
|
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
|
|
|
|
|
13
|
import subprocess
No newline at end of file
|
|
12
|
No newline at end of file
|
|
14
|
|
|
13
|
class MainWindow(QMainWindow, Ui_MainWindow):
No newline at end of file
|
|
15
|
class MainWindow(QMainWindow, Ui_MainWindow):
|
|
14
|
"""
No newline at end of file
|
|
16
|
"""
|
|
15
|
Class documentation goes here.
No newline at end of file
|
|
17
|
Class documentation goes here.
|
|
16
|
"""
No newline at end of file
|
|
18
|
"""
|
|
17
|
def __init__(self, parent = None):
No newline at end of file
|
|
19
|
def __init__(self, parent = None):
|
|
18
|
"""
No newline at end of file
|
|
20
|
"""
|
|
19
|
Constructor
No newline at end of file
|
|
21
|
Constructor
|
|
20
|
"""
No newline at end of file
|
|
22
|
"""
|
|
21
|
QMainWindow.__init__(self, parent)
No newline at end of file
|
|
23
|
QMainWindow.__init__(self, parent)
|
|
22
|
self.setupUi(self)
No newline at end of file
|
|
24
|
self.setupUi(self)
|
|
23
|
No newline at end of file
|
|
25
|
|
|
24
|
@pyqtSignature("")
No newline at end of file
|
|
26
|
@pyqtSignature("")
|
|
25
|
def on_btnDpath_clicked(self):
No newline at end of file
|
|
27
|
def on_btnDpath_clicked(self):
|
|
26
|
"""
No newline at end of file
|
|
28
|
"""
|
|
27
|
Slot documentation goes here.
No newline at end of file
|
|
29
|
Slot documentation goes here.
|
|
28
|
"""
|
|
30
|
"""
|
|
|
No newline at end of file
|
|
31
|
var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
|
|
29
|
self.Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
|
|
|
No newline at end of file
|
|
|
No newline at end of file
|
|
32
|
self.txtDpath.setText(var_Dpath)
No newline at end of file
|
|
30
|
self.txtDpath.setText(self.Dpath)
No newline at end of file
|
|
|
|
|
31
|
No newline at end of file
|
|
33
|
|
|
32
|
# TODO: not implemented yet
No newline at end of file
|
|
34
|
# TODO: not implemented yet
|
|
33
|
# raise NotImplementedError
No newline at end of file
|
|
35
|
# raise NotImplementedError
|
|
34
|
No newline at end of file
|
|
36
|
|
|
35
|
@pyqtSignature("")
No newline at end of file
|
|
37
|
@pyqtSignature("")
|
|
36
|
def on_btnRpath_clicked(self):
No newline at end of file
|
|
38
|
def on_btnRpath_clicked(self):
|
|
37
|
"""
No newline at end of file
|
|
39
|
"""
|
|
38
|
Slot documentation goes here.
No newline at end of file
|
|
40
|
Slot documentation goes here.
|
|
39
|
"""
No newline at end of file
|
|
41
|
"""
|
|
40
|
filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
No newline at end of file
|
|
42
|
filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
|
|
41
|
self.txtRpath.setText(filename)
No newline at end of file
|
|
43
|
self.txtRpath.setText(filename)
|
|
42
|
No newline at end of file
|
|
44
|
|
|
43
|
# TODO: not implemented yet
No newline at end of file
|
|
45
|
# TODO: not implemented yet
|
|
44
|
# raise NotImplementedError
No newline at end of file
|
|
46
|
# raise NotImplementedError
|
|
45
|
|
|
47
|
|
|
|
No newline at end of file
|
|
48
|
@pyqtSignature("")
|
|
46
|
@pyqtSignature("QString")
|
|
|
No newline at end of file
|
|
|
No newline at end of file
|
|
49
|
def on_txtDpath_editingFinished(self):
No newline at end of file
|
|
47
|
def on_txtDpath_textChanged(self, p0):
No newline at end of file
|
|
|
|
|
48
|
"""
No newline at end of file
|
|
50
|
"""
|
|
49
|
Slot documentation goes here.
No newline at end of file
|
|
51
|
Slot documentation goes here.
|
|
50
|
"""
|
|
52
|
"""
|
|
|
No newline at end of file
|
|
53
|
var_Dpath=self.txtDpath.text()
|
|
51
|
p1= Popen(['find',self.Dpath,'-name','*.r'], stdout=PIPE)
|
|
|
No newline at end of file
|
|
|
No newline at end of file
|
|
54
|
p1= Popen(['find', var_Dpath, '-name', '*.r'], stdout=PIPE)
|
|
52
|
p2= Popen(['awk','-F/','{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE)
No newline at end of file
|
|
|
No newline at end of file
|
|
|
|
|
55
|
p2= Popen(['awk', '-F/', '{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE)
No newline at end of file
|
|
53
|
output_p2= p2.communicate()[0]
|
|
56
|
output_p2= p2.communicate()[0]
|
|
|
No newline at end of file
|
|
57
|
#self.txtInfo.setText(output_p2)
No newline at end of file
|
|
54
|
self.txtInfo.setText(output_p2)
No newline at end of file
|
|
|
|
|
55
|
No newline at end of file
|
|
58
|
|
|
|
|
|
59
|
var_list=[]
|
|
|
|
|
|
No newline at end of file
|
|
|
|
|
60
|
for i in range(0, len(output_p2)/8):
|
|
|
|
|
|
No newline at end of file
|
|
|
|
|
61
|
var_list.append(output_p2[8*i:8*(i+1)-1])
No newline at end of file
|
|
56
|
|
|
62
|
|
|
|
No newline at end of file
|
|
63
|
for i in var_list:
|
|
57
|
# TODO: not implemented yet
|
|
|
No newline at end of file
|
|
|
No newline at end of file
|
|
64
|
# self.txtInfo.append(i)
|
|
58
|
# raise NotImplementedError
No newline at end of file
|
|
|
No newline at end of file
|
|
|
|
|
65
|
self.lstStartDay.addItem(i)
No newline at end of file
|