当前位置: 首页 > news >正文

php企业网站开发教程seo推广排名平台有哪些

php企业网站开发教程,seo推广排名平台有哪些,wordpress付费播放,长沙 做网站说明: 自动获取当前根目录下所有py文件生成spec文件,直接运行pyinstaller进行打包即可。直接打包成单执行文件。 直接上代码 import ospathex []def recursion(path, main):if path[:1] ! /:path /listpath os.listdir(path)for item in listpath:if…

说明:

自动获取当前根目录下所有py文件生成spec文件,直接运行pyinstaller进行打包即可。直接打包成单执行文件。

直接上代码

import ospathex = []def recursion(path, main):if path[:1] != '/':path += '/'listpath = os.listdir(path)for item in listpath:if os.path.isdir(path + item):recursion(path + item, main)# print('文件夹',path +item)elif os.path.isfile(path + item):# if '.py' in item and '.pyc' not in item and '__init__' not in item and '.pyz' not in item and main not in item:if '.py' in item and all(i not in item for i in ['.pyc', '__init__', '.pyz','.pyd', main]):# print('文件',path +item)pathex.append(path + item)else:print('未知文件', path + item)def getTxt():return """# -*- mode: python ; coding: utf-8 -*-
block_cipher = Nonea = Analysis(['${thisMain}.py'],pathex=${thisPath},binaries=[],datas=[],hiddenimports=${thisPy},             runtime_hooks=[],excludes=[],win_no_prefer_redirects=False,win_private_assemblies=False,cipher=block_cipher,noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,cipher=block_cipher)
exe = EXE(pyz,a.scripts,a.binaries,a.zipfiles,a.datas,[],name='Main',debug=False,bootloader_ignore_signals=False,strip=False,upx=True,upx_exclude=[],runtime_tmpdir=None,console=True )"""if __name__ == '__main__':# 要使用pyinstaller打包的项目路径# path = 'E:/pythonProject/test1/pyqt'path = os.path.dirname(__file__)# 打包项目的入口文件名main = 'main'recursion(path, main)hiddenimports = []for i in pathex:if i != path:# print(i[:i.rindex('/')])hiddenimports.append(i.replace(i[:i.rindex('/')], '').replace(i[i.index('.'):], '').replace('/', ''))pathexs = []pathex.append(path)for i in pathex:if i != path:pathexs.append(i.replace(os.path.abspath(os.path.join(os.getcwd(), "../")), '').replace('/', '\\'))continuepathexs.append(i.replace('/', '\\'))outTxt = getTxt().replace("${thisPy}",f'{hiddenimports}').replace("${thisPath}",f'{pathexs}').replace("${thisMain}",main)with open(f"{path}/{main}.spec","w",encoding="utf-8")as f:f.write(outTxt)f.close()exit(0)

打包后的spec文件怎么使用?

直接在terminal窗口执行 pyinstaller 文件名.spec 然后回车即可

http://www.dt0577.cn/news/9672.html

相关文章:

  • wordpress 收费吗宁波seo推广联系方法
  • 成都网站seo费用天津百度网站快速排名
  • 在网站上做网络课堂软件多少钱竞价推广怎样管理
  • java做简易网站关键词优化案例
  • 文登区城乡建设局网站响应式网站模板的优势
  • 重庆网站建设及推广公司百度网址提交入口平台
  • 西安做网站哪里价格低广告策划公司
  • 免费申请网站空间及域名百度站长工具数据提交
  • 衡阳网站下载优化大师安装桌面
  • 做网站还 淘宝无锡营销型网站建设
  • 平台appseo网站排名的软件
  • 工业和信息化部网站备案查询怎么创建网站链接
  • 盐城建设银行网站获客软件
  • 肇东市网站app推广代理
  • 快站wordpress十大搜索引擎排名
  • 有没有网站学做总结临沂seo整站优化厂家
  • 如何将网址提交到一些权重比较高的网站网站推广优化的方法
  • 公司被其它人拿来做网站网站seo专员招聘
  • 网站开发工具大全被忽悠去做网销了
  • 个人域名 公司网站网络营销的特点举例说明
  • 如何做好网站推广方法百度投放广告
  • 免费网站提供网络营销有什么特点
  • 做华为网站的还有哪些功能怎么做好推广
  • 大连网站建设网站自己如何做链接推广
  • 网站开发工程师绩效考核表优化网站排名如何
  • 网站免费空间申请谷歌ads
  • 哈尔滨网站制作建设多少钱新塘网站seo优化
  • 做网站大概网上商城推广13种方法
  • 企业为什么要做网站合肥网站
  • 乐清做网站的公司百家号关键词排名