@ptmcg@fosstodon.org
@ptmcg@fosstodon.org avatar

ptmcg

@ptmcg@fosstodon.org

Author/maintainer of #pyparsing, #littletable, #plusminus - I do digital art when I get the time. Co-author of "Python in a Nutshell, 4th Ed". #python #pynutshell4

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ptmcg, to random
@ptmcg@fosstodon.org avatar

Just 1 SO question short of a thousand for pyparsing

kati, to random
@kati@fosstodon.org avatar

I have wanted to go to @pytexas for years, and it did not disappoint. It was absolutely wonderful. ❤️

ptmcg,
@ptmcg@fosstodon.org avatar

@kati @pytexas Was great meeting you and talking with so many new Python people this weekend! Best of luck to you at JPM and in Djangoland!

foxmask, (edited ) to python French
@foxmask@framapiaf.org avatar
ptmcg,
@ptmcg@fosstodon.org avatar

@foxmask Have you looked at textual for TUI-izing your work?

ptmcg, to random
@ptmcg@fosstodon.org avatar

Me, explaining my coding struggles to my wife: You know those crane games, where you move the claw to try to get the toy?
Wife: Yeah...
Me: Ok, so I'm trying to get a particular toy. But I can't touch the crane game controls. Because that crane game is actually inside another crane game.
Wife: <frowning> Uh...?
Me: And I think that crane game's inside still another crane game...
Wife: Wow. Who wrote this code?
Me: <awkward silence>

mkennedy, to python
@mkennedy@fosstodon.org avatar

Looks like I won’t be speaking at this year folks. That's 0/8 talks (accepted / submitted) over the years. You'd think just by the numbers one of them would have made it in. Oh well. Here are my 3 talks that were not accepted.

  • 20+ Cutting Edge Python Frameworks, Packages, and Tools You Should Know About
  • Python's Types: 5 Amazing Ways Python Type Hints Will Supercharge Your Code
  • HTMX + Flask: Modern Python Web Apps, Hold the JavaScript
ptmcg,
@ptmcg@fosstodon.org avatar

@mkennedy Are you attending anyway? I'll be there, please look me up.

ptmcg, to python
@ptmcg@fosstodon.org avatar

Enhanced my log_merger utility to include more UI niceties (search/next/prev, go to line, go to time, help/about), plus support for non-standard timestamp formats. Installable from PyPI - pip install log_merger Amazing mouse support and responsiveness in a pure-Python console app!

ptmcg, to python
@ptmcg@fosstodon.org avatar

Video demo of log_merger, a terminal-session viewer of merged log files. This is v0.2.0, just showing TUI table navigation basics - v0.3 will have more UI features. Installable from pypi using pip install log_merger

video/mp4

ptmcg, to python
@ptmcg@fosstodon.org avatar

My little project using has come along nicely. Side-by-side browsing of multiple log files, merged by timestamp - as text output, CSV, or interactive in-terminal browser (so it can be used within an SSH session). Repo: https://github.com/ptmcg/log_merger.git Or install using pip install log_merger. Version 0.1.0 so far, some good stuff coming in 0.2.0.

image/jpeg

veronica, to philosophy
@veronica@mastodon.online avatar

Someone made a joke about numerals, and I remembered I don't need to know them because I have a function for that. 😁

The code is based on some numerical example I saw somewhere. I made a few improvements.

ptmcg,
@ptmcg@fosstodon.org avatar

@veronica I do this in the pyparsing examle romanNumerals.py, that creates then parses and evaluates Roman numerals from 1-5000. https://github.com/pyparsing/pyparsing/blob/c09eb6e4bb283b375e53cfe851bb6a63ed3957bb/examples/romanNumerals.py#L46

ptmcg,
@ptmcg@fosstodon.org avatar

@veronica That code is kind of old, and pre-dates the PEP8-ification of pyparsing's API. Also, after I created the railroad diagram for it, it seems like a very liberal parser, accepting any string combination of I's V's, X's, M's, etc. I have a stricter version parser almost ready.

ptmcg, to python
@ptmcg@fosstodon.org avatar

I just released version 3.1.0 of . Compatibility with Python 3.12 and the latest version of railroad-diagrams. Many bugfixes and new features, all the details are here: https://github.com/pyparsing/pyparsing/releases/tag/3.1.0

ptmcg,
@ptmcg@fosstodon.org avatar

@pamelafox Yes! I never thought much of them before, but Michael Milton's submission of this feature to pyparsing really helped me visualize what the parser structures are doing (and helped me fix some bugs or just generally clean up some of the provided examples).

Here is a StackOverflow answer I posted that included the railroad diagram for my proposed parser. https://stackoverflow.com/a/76546559/165216

ptmcg, to random
@ptmcg@fosstodon.org avatar

Thanks David! Yes! I'll connect up with you tomorrow, either lunch or dinner would be fine, though dinner might be less time-constrained.

ptmcg,
@ptmcg@fosstodon.org avatar

@benjaminhollon Ha, it was, thanks! I guess not everyone is named "David".

ptmcg, to random
@ptmcg@fosstodon.org avatar

Where is the signup for lightning talks?

ptmcg,
@ptmcg@fosstodon.org avatar

@hugovk @nmp I want to believe this, but I have wandered all over that area, and not seen the signup board. Can you post a picture?

ptmcg,
@ptmcg@fosstodon.org avatar

@nmp @hugovk Thanks all, I finally found them. A lot of submissions, with only 50 minutes, that's, um, only 10 talks, and many more submissions than that. Good luck to everyone who submitted!

ptmcg, to python
@ptmcg@fosstodon.org avatar

I'm excited and honored to be included in this group of authors - "Python in a Nutshell, 4th Ed" gets released this month! New features in this edition:

  • detailed coverage of Python versions 3.7 through 3.11
  • all new material on recent Python features, including type annotations and structured pattern matching
  • an appendix cataloging changes by each version 3.7 through 3.11
  • selected online chapters and all source code examples available in a Github repository
  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • cubers
  • magazineikmin
  • everett
  • thenastyranch
  • Youngstown
  • slotface
  • hgfsjryuu7
  • ngwrru68w68
  • rosin
  • kavyap
  • khanakhh
  • PowerRangers
  • DreamBathrooms
  • anitta
  • mdbf
  • InstantRegret
  • ethstaker
  • Durango
  • osvaldo12
  • tacticalgear
  • vwfavf
  • tester
  • GTA5RPClips
  • cisconetworking
  • modclub
  • normalnudes
  • provamag3
  • All magazines