kuliuheng

1、工具

(1)编代码用“JetBrains PyCharm”;

(2)要想编写的脚本能够直接双击运行,还需要用pyinstaller打包工具;

(3)要下载pyinstaller就用Python自带的工具pip:pip install PyInstaller;

2、打包

pyinstaller -F test.py        # 加上-F参数能打包成一个独立的exe程序

3、PyCharm在Mac上的注册码

参考:http://www.360kb.com/kb/2_24.html

4、设置创建文件时自动添加信息

Preferences -> Editor -> File and Code Templates -> Python Scripts 设置:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File    : ${NAME}.py
# @Time    : ${DATE} ${TIME}
# @Author  : ${USER}
# @Email   : liuheng.klh@alibaba-inc.com

 

分类:

技术点:

相关文章:

  • 2021-10-16
  • 2021-11-13
  • 2021-06-12
  • 2021-09-27
  • 2021-11-06
  • 2021-08-07
  • 2021-09-14
猜你喜欢
  • 2021-11-06
  • 2021-12-26
  • 2021-08-27
  • 2021-11-02
  • 2021-11-13
  • 2021-09-17
  • 2021-09-29
相关资源
相似解决方案