This commit is contained in:
chendelin1982 2021-10-07 17:36:09 +08:00
parent f660e5dbef
commit 40abab1b49
5 changed files with 25 additions and 15 deletions

Binary file not shown.

View file

@ -41,7 +41,8 @@ class Create:
def setEnv(self):
'''set the usable port for application'''
fileop=FileOp()
print(fileop.fileToJson('./joomla/.env_all'))
pass
def upRepo(self):
@ -53,4 +54,6 @@ class Create:
os.system(cmd)
def printResult(self):
pass
pass

View file

@ -11,7 +11,7 @@ class SmoothUrl:
def __init__(self):
pass
def res(url_list: Tuple):
def res(self, url_list: Tuple):
for item in url_list:
try:
@ -58,16 +58,16 @@ class FileOp:
dict = {}
with open(path) as fh:
for line in fh:
if line == "\n":
continue
print(line.find(remark))
if line.find(remark) != 0:
item, value = line.strip().split(separate, -1)
item = line.strip()
dict[item] = value
else:
continue
fh.close()
print (dict)
return dict
class NetOp:
@ -110,9 +110,4 @@ class SecurityOp:
and any(c.isupper() for c in password)
and sum(c.isdigit() for c in password) >= 3):
break
print(password)
test=FileOp()
#test.setPort(9001)
test.fileToJson('./joomla/.env_all')
print(password)

View file

@ -1,4 +1,16 @@
import json
class Card:
def __init__(self, rank, suit):
self.suit = suit
self.rank = rank
self.hard, self.soft = self._points()
with open("./joomla/.env_all","r") as file:
jsonData = json.dump(file, tempfile)
class NumberCard( Card ):
def _points(self):
return int(self.rank), int(self.rank)
class AceCard( Card ):
def _points(self):
return 1, 11
nc=NumberCard(11,12)
print(nc)