-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Python3 TemplatePython3 TemplatePython3 Template
Description
py3
{
"Python3 Template": {
"prefix": "py3",
"body": [
"#!/usr/bin/env python3",
"# coding: utf8",
"",
"__author__ = 'xgqfrms'",
"__editor__ = 'vscode'",
"__version__ = '1.0.1'",
"__github__ = 'https://github.com/xgqfrms/Raspberry-Pi'",
"__git__ = 'https://github.com/xgqfrms/Raspberry-Pi.git'",
"__copyright__ = \"\"\"",
" Copyright (c) 2012-2050, xgqfrms; mailto:xgqfrms@xgqfrms.xyz",
"\"\"\"",
"",
"\"\"\"",
"",
"/**",
" * ",
" * @author xgqfrms",
" * @license MIT",
" * @copyright xgqfrms",
" * @created 2020-01-01",
" * @updated 2023-06-0$1",
" * ",
" * @description $2",
" * @augments $3",
" * @example $4",
" * @link $5",
" * ",
" */",
"",
"\"\"\"",
"",
"print(\"Hello, Python 3 π\")",
"",
"# function addition",
"def add(n1, n2):",
" return n1 + n2",
"",
"if __name__ == '__main__':",
" print('main / init π»')",
"",
"try:",
" sum = add(1, 2)",
" print('add(1, 2) =', sum)",
"except KeyboardInterrupt:",
" print('Ctrl + C exit β
')",
"except RuntimeError as error:",
" print('error =', error, error.args[0])",
" pass",
"except Exception as error:",
" print('exception =', error)",
" raise error",
"finally:",
" # cleanup",
" print('finally, clear buffer! π»')",
"",
"print('exit Python REPL')",
"exit()",
"",
"'''",
"# $ python3 ./template.py",
"$ py3 ./template.py",
"",
"Hello, Python 3 π",
"main / init π»",
"add(1, 2) = 3",
"finally, clear buffer! π»",
"exit Python REPL",
"'''",
""
],
"description": "Python3 Template & code snippets!"
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Python3 TemplatePython3 TemplatePython3 Template