-
Notifications
You must be signed in to change notification settings - Fork 11
/
__init__.py
34 lines (27 loc) · 944 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import sys
from shutil import copyfile
def mkdir(path):
path = path.strip()
path = path.rstrip("\\")
isExists = os.path.exists(path)
if not isExists:
#print(path + ' 创建成功')
os.makedirs(path)
return True
else:
print(path + ' 目录已存在')
return False
def doo():
sweetest_dir = os.path.dirname(os.path.realpath(__file__))
current_dir = os.getcwd()
doo_folder = os.path.join(current_dir, 'doo_example')
if not mkdir(doo_folder):
return
copyfile(os.path.join(sweetest_dir, 'example.xlsx'),
os.path.join(doo_folder, 'example.xlsx'))
copyfile(os.path.join(sweetest_dir, 'app.py'),
os.path.join(doo_folder, 'app.py'))
copyfile(os.path.join(sweetest_dir, 'doo.postman_collection.json'),
os.path.join(doo_folder, 'doo.postman_collection.json'))
print('\n生成 doo example 成功\n')