python_code_snippets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python_code_snippets [2020/10/06 07:21] – juckins | python_code_snippets [2025/01/23 06:24] (current) – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Python | + | ==== Python |
__Handling arguments__ | __Handling arguments__ | ||
Line 22: | Line 22: | ||
__Date and time strings__ | __Date and time strings__ | ||
- | [[https:// | + | See format codes [[https:// |
| | ||
from datetime import datetime | from datetime import datetime | ||
Line 50: | Line 50: | ||
print(url, file=outputFile) | print(url, file=outputFile) | ||
outputFile.close | outputFile.close | ||
+ | | ||
+ | __Logging__ | ||
+ | | ||
+ | [[https:// | ||
+ | |||
+ | logging.basicConfig(format=' | ||
+ | logging.debug(' | ||
+ | logging.info(' | ||
+ | logging.warning(' | ||
+ | |||
+ | |||
+ | [[https:// | ||
+ | |||
+ | __Working with JSON__ | ||
+ | |||
+ | * Use PyPi [[https:// | ||
+ | * Use PyPi [[https:// | ||
+ | * sudo pip install demjson | ||
+ | * installs into / | ||
+ | * jsonlint data.json | ||
+ | * jsonlint --help |
python_code_snippets.1601983311.txt.gz · Last modified: 2020/10/06 07:21 by juckins