User-Profile-Image
hankin
  • 5
  • centos7
  • docker
  • mysql
  • PostgreSQL
  • git/gitlab
  • ELK
  • python
    • python-Tornado
    • python-django
  • redis
  • nginx
  • kvm
  • proxmox
  • mongo
  • kubernetes
  • prometheus
  • GlusterFs
  • nfs
  • freeswitch
  • httpd
  • shell脚本
  • linux
  • fastdfs
  • nextcloud
  • openssl
  • openvpn
  • rabbitmq
  • sqlite
  • svn
  • java
  • ubuntu
  • vue2
  • wordpress
  • php
  • IOT物联网
  • 项目
  • 故障处理
  • 树莓派
  • 博客存档
  • 未分类
  • 杂项
  • #1742(无标题)
  • 新视野
  • 分类
    • 项目
    • 树莓派
    • 杂项
    • 未分类
    • 新视野
    • 故障处理
    • 博客存档
    • 交换机
    • wordpress
    • vue2
    • ubuntu
    • svn
    • sqlite
    • shell脚本
    • redis
    • rabbitmq
    • python-django
    • python
    • proxmox
    • prometheus
    • PostgreSQL
    • php
    • openvpn
    • openssl
    • nginx
    • nfs
    • nextcloud
    • mysql
    • mongo
    • linux
    • kvm
    • kubernetes
    • java
    • IOT物联网
    • httpd
    • GlusterFs
    • git/gitlab
    • freeswitch
    • fastdfs
    • ELK
    • docker
    • centos7
  • 页面
    • #1742(无标题)
  • 友链
      请到[后台->主题设置->友情链接]中设置。
Help?

Please contact us on our email for need any support

Support
    首页   ›   python   ›   正文
python

python技巧

2022-10-28 23:33:38
841  0 0
打包文件
pyinstaller -F xxx.py
  #–icon=图标路径
  #-F 打包成一个exe文件
  #-w 使用窗口,无控制台
  #-c 使用控制台,无窗口
  #-D 创建一个目录,里面包含exe以及其他一些依赖性文件
  #pyinstaller -h 来查看参数
  #有命令窗口弹出
      pyinstaller -F a.py  
  #无命令窗口弹出
      pyinstaller -F -w a.py  
  #或者
      pyinstaller -F a.py  --noconsole
终端背景颜色
Windows CMD控制台颜色
    import os
    os.system('color 1f') # sets the background to blue

Linux终端
    import os
    os.system('setterm -background white -foreground white -store')
print函数显示颜色
https://blog.csdn.net/qq_37952052/article/details/124110713
https://blog.csdn.net/qq_38962621/article/details/108038966  
print("\033[显示方式;前景颜色;背景颜色m…\033[0m")
print("\033[0;32;44m" + "     " + i + "\033[0m")
评论 (0)

点击这里取消回复。

欢迎您 游客  

Copyright © 2025 网站备案号 : 蜀ICP备2022017747号
smarty_hankin 主题. Designed by hankin
主页
页面
  • #1742(无标题)
博主
tang.show
tang.show 管理员
linux、centos、docker 、k8s、mysql等技术相关的总结文档
213 文章 2 评论 201630 浏览
测试
测试