创建pycharm的自定义python模板

在pycharm上依次选择打开 File->settings->Editor->File andCode Templates->Python Script

复制以下模板内容:

[python]  view plain  copy
  1. #!/usr/bin/env python  
  2. # encoding: utf-8  
  3. #set( $SITE = "https://blog.csdn.net/yaningli" )  
  4.   
  5. """ 
  6. @version: v1.0 
  7. @author: Liyaning 
  8. @license: Apache Licence  
  9. @contact: [email protected] 
  10. @site: ${SITE} 
  11. @software: ${PRODUCT_NAME} 
  12. @file: ${NAME}.py 
  13. @time: ${DATE} ${TIME} 
  14. """  
  15.   
  16. def func():  
  17.     pass  
  18.   
  19. class main():  
  20.     def __init__(self):  
  21.         pass  
  22.   
  23. if __name__ == "__main__":  
  24.     pass  

猜你喜欢

转载自blog.csdn.net/yaningli/article/details/80090067