ptmcg
Re:Summary of Major Changes Between Python Versions
on Saturday July 06, 2024 @10:04AM (#40890552)
In this snippet
```python if header.startswith("X-Forwarded-"): section = header.removeprefix("X-Forwarded-") ```
the `startswith()` check is unnecessary. If `header` doesn't start with "X-Forwarded-" then `header.removeprefix("X-Forwarded-")` just returns `header`.
Nice summary doc, with good examples. You can also visit [this site of mine](https://ptmcg.pythonanywhere.com/python_nutshell_app_a_searc...) to search for changes by version (3.7-3.11).
Re:Ask HN: Interesting TUIs (text user interfaces), maybe forgotten ones?
on Thursday May 09, 2024 @04:27PM (#40312623)
I'm the author/maintainer for logmerger, a side-by-side log file viewer built using the Python `textual` TUI framework. Side-by-side view merges log files into a single vertical timeline (an inline view can also be selected). `textual` implements horizontal/vertical scroll control and mouse actions, so viewing 3 or 4 log files side-by side is not difficult. Auto-detects various common timestamp formats, plus PCAP file support (to merge network packet captures with your client and/or server logs).
PyPI: https://pypi.org/project/logmerger/ Github: https://github.com/ptmcg/logmerger (screenshots in README)
Re:TatSu takes grammars in variation of EBNF, outputs memoizing Python...
on Sunday May 08, 2022 @01:04AM (#31301475)
The 3.0 release of pyparsing includes some nice extensions over its older 2.x code base, including LR parsing support and railroad diagram generation. Also, PEP-8 API naming has been added (but with pre-PEP-8 synonyms defined for legacy compatibility).
https://github.com/pyparsing/pyparsing
(Disclosure: I am the author of pyparsing.)
Re:Ask HN: Did an UML diagram ever changed the world?
on Saturday April 30, 2011 @03:58AM (#2500154)
I'm glad to see that somebody finds these to be useful.