Hacker Newsnew | past | comments | ask | show | jobs | submit | ptmcg's commentslogin

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).


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)


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.)


I'm glad to see that somebody finds these to be useful.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: