Split some code into libs directory
This commit is contained in:
1 parent
3028c4646e
commit
84b909e7cb
7 files changed
+32
-10
No files matched your search
@@ -0,0 +1,2 @@
|
||||
import files
|
||||
import config
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
import files as f
|
||||
import json
|
||||
|
||||
def readConf():
|
||||
try:
|
||||
jsonData = json.loads(f.openFile("config.json").read())
|
||||
except Exception as e:
|
||||
print e
|
||||
jasonData = ""
|
||||
return jsonData
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
def openFile(path):
|
||||
try:
|
||||
myFile = open(path)
|
||||
except Exception as e:
|
||||
print e
|
||||
pass
|
||||
return myFile
|
||||
|
||||
def closeFile(fileObj):
|
||||
try:
|
||||
fileObj.close()
|
||||
except Exception as e:
|
||||
print e
|
||||
pass
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user