from distutils.core import setup
import py2exe
import os
#setup(console=['13.py','12.py'])
#方法一
a=[]
for parent,dirnames,filenames in os.walk(os.getcwd()):
for filename in filenames:
if filename.endswith('.py'):
if filename=='setup.py':
continue
else:
a.append(filename)
#print os.path.join(parent,filename)
#print a
#setup(console=a)
#方法二
def getfile_list():#获取文件列表
all_name=os.listdir(os.getcwd())
return all_name
def get_file():
file_name=[]
for filename in getfile_list():
try:
if filename.endswith('.py'):
if filename=='setup.py':
continue
else:
file_name.append(filename)
else:
pass
except BaseException as e:
print(e)
return file_name
#print(file_name)
#setup(console=get_file())
获取对应的文件(文件加密)
最新推荐文章于 2022-01-14 16:39:06 发布