一、工具html
(1)編代碼用「JetBrains PyCharm」;python
(2)要想編寫的腳本可以直接雙擊運行,還須要用pyinstaller打包工具;工具
(3)要下載pyinstaller就用Python自帶的工具pip:pip install PyInstaller;spa
二、打包code
pyinstaller -F test.py # 加上-F參數能打包成一個獨立的exe程序
三、PyCharm在Mac上的註冊碼htm
參考:http://www.360kb.com/kb/2_24.htmlblog
四、設置建立文件時自動添加信息ip
Preferences -> Editor -> File and Code Templates -> Python Scripts 設置:it
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : ${NAME}.py # @Time : ${DATE} ${TIME} # @Author : ${USER} # @Email : liuheng.klh@alibaba-inc.com