Python开发经验汇总

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
原文地址:https://www.cnblogs.com/kuliuheng/p/6670810.html