在File->Settings->Editor->File and Code Templates里,选择Python Script
#!~/anaconda3/envs/pytorch/bin/python3.7
# -*- coding: UTF-8 -*- #
"""
@author:${USER}
@file:${NAME}.py
@time:${YEAR}/${MONTH}/${DAY}
"""
if __name__ == "__main__":
pass
在File->Settings->Editor->File and Code Templates里,选择Python Script
#!~/anaconda3/envs/pytorch/bin/python3.7
# -*- coding: UTF-8 -*- #
"""
@author:${USER}
@file:${NAME}.py
@time:${YEAR}/${MONTH}/${DAY}
"""
if __name__ == "__main__":
pass
#!/usr/bin/python
,本人觉得不合适,需要根据个人情况进行修改。