在pycharm上依次选择打开File->settings->Editor->File andCode Templates->Python Script
复制以下模板内容:
#!/usr/bin/python
#coding:utf-8
"""
@author: Lieb
@contact: xx@xx.com
@software: ${PRODUCT_NAME}
@file: ${NAME}.py
@time: ${DATE} ${TIME}
"""
def main():
pass
if __name__ == "__main__":
main()