Add Python
This commit is contained in:
parent
25489c716a
commit
8132479ee9
7 changed files with 36 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
- [C](#c)
|
- [C](#c)
|
||||||
- [C++](#c-1)
|
- [C++](#c-1)
|
||||||
|
- [Python](#python)
|
||||||
- [OCaml](#ocaml)
|
- [OCaml](#ocaml)
|
||||||
- [Rust](#rust)
|
- [Rust](#rust)
|
||||||
- [Typescript](#typescript)
|
- [Typescript](#typescript)
|
||||||
|
@ -30,6 +31,12 @@ Copy and paste [`cpp/`](./cpp/) directory, and you should be good to go!
|
||||||
|
|
||||||
> Note that in headers, the syntax is `PROJECTNAME_FILENAME_HPP`
|
> Note that in headers, the syntax is `PROJECTNAME_FILENAME_HPP`
|
||||||
|
|
||||||
|
## Python
|
||||||
|
|
||||||
|
Copy and paste [`python/`](./python/) directory, and you should be good to go!
|
||||||
|
|
||||||
|
- **Run `python main.py` to start the program.**
|
||||||
|
|
||||||
## OCaml
|
## OCaml
|
||||||
|
|
||||||
Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
|
Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
|
||||||
|
|
5
python/.gitignore
vendored
Normal file
5
python/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
/bin
|
||||||
|
/lib
|
||||||
|
pyvenv.cfg
|
||||||
|
|
||||||
|
__pycache__/
|
9
python/.vscode/extensions.json
vendored
Normal file
9
python/.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"ms-python.python",
|
||||||
|
"ms-python.vscode-pylance",
|
||||||
|
"ms-python.black-formatter",
|
||||||
|
"ms-python.isort",
|
||||||
|
"charliermarsh.ruff"
|
||||||
|
]
|
||||||
|
}
|
10
python/.vscode/settings.json
vendored
Normal file
10
python/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"editor.tabSize": 4,
|
||||||
|
"editor.insertSpaces": false,
|
||||||
|
|
||||||
|
"files.insertFinalNewline": true,
|
||||||
|
"files.trimFinalNewlines": true,
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
|
||||||
|
"python.analysis.typeCheckingMode": "basic"
|
||||||
|
}
|
4
python/main.py
Normal file
4
python/main.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
from src.hello import hello
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(hello)
|
0
python/requirements.txt
Normal file
0
python/requirements.txt
Normal file
1
python/src/hello.py
Normal file
1
python/src/hello.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
hello = "Hello, world!"
|
Loading…
Reference in a new issue