OcttKB/Wiki-OcttKB/tiddlers/Normal/_Python.tid

40 lines
2.3 KiB
Plaintext

created: 20221110120605389
creator: Octt
icon: 🐍
modified: 20231224173748386
modifier: Octt
page-cover: https://source.unsplash.com/random/?Python
tags: Development
title: Python
[[Python|https://www.python.org]] is a high-level, general-purpose, dynamically-typed, and garbage-collected programming language, with an extensive standard library and mandatory-indentation style.
<<^wikipediaframe Python>>
I hate that, while tab-indentation is practically supported by the interpreter, it's against the standard, and linters/editors hate you if you use tabs instead of spaces. `micro` just won't let you persist the option to keep tabs enabled instead of spaces across sessions...
---
* [[Thonny|https://thonny.org/]] --- //Python IDE for beginners//, especially useful and comfy for integrating full MicroPython support, meaning one can edit the scripts residing on the MP device directly --- <<#[ Git"https://github.com/thonny/thonny">>
* [[PocketPy|https://pocketpy.dev/]] - //C++17 header-only Python interpreter for game engines.// --- <<[ "[[Git|https://github.com/blueloveTH/pocketpy]]">>
* <<httpL Python.helpful.codes>>
* <<linkdescgit "Python Tips / Intermediate Python Book" "https://book.pythontips.com/en/latest/" "topics which are discussed in this book open up your mind towards some nice corners of Python language" "https://github.com/yasoob/intermediatePython">>
!! How to and troubleshooting
Text:
* [[Hex string to int|https://www.tutorialspoint.com/How-to-convert-hex-string-into-int-in-Python]] --- `int('6f637474', 16)`, `int('0x6f637474', 10)`
* [[Python 3 string to hex|https://stackoverflow.com/questions/2340319/python-3-string-to-hex]] --- `'string'.encode().hex()`
Files:
* [[How to copy files in Python?|https://stackoverflow.com/questions/123198/how-to-copy-files]] (with shutil)
!!! ''HTML things''
* [["html" std library|https://docs.python.org/3/library/html.html]], [[Beautiful Soup|https://www.crummy.com/software/BeautifulSoup/]]
* Escaping HTML: [[html.escape() in Python|https://www.educative.io/answers/what-is-htmlescape-in-python]], [[easiest way to escape HTML in Python|https://stackoverflow.com/questions/1061697/whats-the-easiest-way-to-escape-html-in-python]]
* Unescaping HTML: [[Decode HTML entities in Python string|https://stackoverflow.com/questions/2087370/decode-html-entities-in-python-string]]