Add Python

This commit is contained in:
Mylloon 2023-09-19 16:30:22 +02:00
parent 25489c716a
commit 8132479ee9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 36 additions and 0 deletions

View file

@ -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
View file

@ -0,0 +1,5 @@
/bin
/lib
pyvenv.cfg
__pycache__/

9
python/.vscode/extensions.json vendored Normal file
View 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
View 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
View file

@ -0,0 +1,4 @@
from src.hello import hello
if __name__ == "__main__":
print(hello)

0
python/requirements.txt Normal file
View file

1
python/src/hello.py Normal file
View file

@ -0,0 +1 @@
hello = "Hello, world!"