##// END OF EJS Templates
implementacion de funciones:...
ralonso -
r39:40
parent child
Show More
@@ -3,6 +3,29
3 No newline at end of file
3
4 #class BKmanager: No newline at end of file
4 #class BKmanager:
5 # def __init__(self): No newline at end of file
5 # def __init__(self):
6 from subprocess import *
No newline at end of file
7 import sys
No newline at end of file
8 import os
No newline at end of file
9 import subprocess
No newline at end of file
10 import commands
No newline at end of file
11
No newline at end of file
12 #Entero a cadena agregando ceros delante
No newline at end of file
13 def i2s(var_n, var_length=4):
No newline at end of file
14 var_n2=str(var_n)
No newline at end of file
15 while len(var_n2) < var_length:
No newline at end of file
16 var_n2 = "0"+var_n2
No newline at end of file
17 return var_n2 No newline at end of file
6 No newline at end of file
18
7 No newline at end of file
19
8 No newline at end of file
20
21 def make_dirs(var_path, list_dirs, self):
No newline at end of file
22
No newline at end of file
23 var_cmd="mkdir -p "+str(var_path)
No newline at end of file
24 for var_dir in list_dirs:
No newline at end of file
25 var_output=commands.getstatusoutput(var_cmd+'/'+var_dir)[0]
No newline at end of file
26 print var_cmd+'/'+var_dir
No newline at end of file
27 if var_output != 0:
No newline at end of file
28 self.txtInfo.append("Error al crear el directorio "+var_dir+", output_error:" + str(var_output))
No newline at end of file
29 return
No newline at end of file
30 else:
No newline at end of file
31 self.txtInfo.append('Carpetas creadas correctamente') No newline at end of file
@@ -1,7 +1,7
1 <?xml version="1.0" encoding="UTF-8"?> No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE Project SYSTEM "Project-4.6.dtd"> No newline at end of file
2 <!DOCTYPE Project SYSTEM "Project-4.6.dtd">
3 <!-- eric4 project file for project jro_backup_manager -->
3 <!-- eric4 project file for project jro_backup_manager -->
No newline at end of file
4 <!-- Saved: 2010-05-16, 11:21:24 --> No newline at end of file
4 <!-- Saved: 2010-04-14, 15:28:43 --> No newline at end of file
5 <!-- Copyright (C) 2010 , --> No newline at end of file
5 <!-- Copyright (C) 2010 , -->
6 <Project version="4.6"> No newline at end of file
6 <Project version="4.6">
7 <Language>en</Language> No newline at end of file
7 <Language>en</Language>
@@ -13,6 +13,7
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 No newline at end of file
17
17 class MainWindow(QMainWindow, Ui_MainWindow): No newline at end of file
18 class MainWindow(QMainWindow, Ui_MainWindow):
18 """ No newline at end of file
19 """
General Comments 0
You need to be logged in to leave comments. Login now