med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

373
active users

#pyparsing

0 posts0 participants0 posts today
Paul McGuire<p>If you maintain an open source package, set up a standing search on scholar.google.com for your package name. You'll get gmail notifications of published papers referencing your package.</p><p>It's truly gratifying to see students and research teams making use of my pyparsing package to parse data sets and DSLs, so they can quickly get past the pesky parser development stage and get on with the business of their actual field of study. <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/google" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>google</span></a> <a href="https://fosstodon.org/tags/oss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oss</span></a> <a href="https://fosstodon.org/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a></p>
Paul McGuire<p>Pyparsing 3.2.2 cleans up a formerly internal-only utility method make_compressed_re(), and makes it part of the public API. Given a list of strings, it generates a regex to match those strings and only those (so no cheating like ".*").</p><p>Here are before/after expressions for matching chemical symbols.</p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/regex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>regex</span></a></p>
Paul McGuire<p><a href="https://fosstodon.org/tags/Pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Pyparsing</span></a> API going back to version 1.0.0 (2003) has used a camelCase name scheme for its methods and argument names. In versions 3.0-3.1 (Oct 2021-Jun 2023), I added PEP8-compliant snake_case names, while maintaining synonym definitions for the legacy names for backward compatibility.</p><p>Soon, pyparsing will begin emitting DeprecationWarnings for the legacy names. To ease this transition, the next release 3.2.2 will include a utility to convert in place scripts that use the legacy names. <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>Pyparsing sightings - recent posts/pages using pyparsing (2/2):</p><p>- ciscoconfparse parses configuration files for various network devices using pyparsing<br> <a href="https://pypi.org/project/ciscoconfparse2/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">pypi.org/project/ciscoconfpars</span><span class="invisible">e2/</span></a></p><p>- moto is a mocking package for AWS boto API, using pyparsing for an internal infix notation parser<br> <a href="https://github.com/getmoto/moto" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/getmoto/moto</span><span class="invisible"></span></a></p><p>- Pegasus SaaS application builder uses pyparsing internally<br> <a href="https://docs.saaspegasus.com/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.saaspegasus.com/</span><span class="invisible"></span></a></p><p>- EasyABC is an editor for the ABC music notation language<br> <a href="https://github.com/jwdj/EasyABC" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/jwdj/EasyABC</span><span class="invisible"></span></a></p><p><a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>Pyparsing sightings - some recent posts/pages using pyparsing (1/2):</p><p>- Pyparsing is embedded as a parsing engine for Juniper Networks Junos PyEZ automation environment for smart devices.<br> <a href="https://www.juniper.net/documentation/us/en/software/junos-pyez/junos-pyez-developer/junos-pyez-developer.pdf" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">juniper.net/documentation/us/e</span><span class="invisible">n/software/junos-pyez/junos-pyez-developer/junos-pyez-developer.pdf</span></a></p><p>- Pyparsing included in the examples for the Python Packaging User Guide.<br> <a href="https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">packaging.python.org/en/latest</span><span class="invisible">/guides/licensing-examples-and-user-scenarios/</span></a></p><p>- Papercrawler uses pyparsing to extract metadata from published papers, journals, and conference proceedings.<br> <a href="https://github.com/sucv/paperCrawler" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/sucv/paperCrawler</span><span class="invisible"></span></a></p><p><a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/parsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsing</span></a></p>
Paul McGuire<p>I just released pyparsing 3.2.1 with a very cool addition to the railroad diagrams that pyparsing generates for its parsers - non-terminal diagram elements now link to their definitions elsewhere in the diagram! This is pretty handy when the diagram is for a complex parser, as in this demo of a parser/evaluator for time references like "3 weeks from today" or "0800 two days from now" or "in exactly twenty-four hours". <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> <a href="https://fosstodon.org/tags/railroaddiagram" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>railroaddiagram</span></a></p>
Paul McGuire<p>I'm seeing a number of responses from pyparsing users (or matplotlib users) that they are getting a version of pyparsing that is not compatible with their version of Python (they are running Python 3.8 or older, but the new pyparsing release requires Python 3.9 or later). After some experimenting, I found this `requirements.txt` to help in selecting the right pyparsing version:</p><p>matplotlib<br>pyparsing&gt;=3.2;python_version&gt;="3.9"<br>pyparsing&gt;=3.1;python_version&lt;"3.9"</p><p><a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/matplotlib" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>matplotlib</span></a></p>
Paul McGuire<p>Attention <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> users: I just pushed release 3.2.0b3, which will be the last beta before I push out 3.2.0. This includes:</p><p>- POSSIBLE BREAKING CHANGE: Fixed bug in `transform_string()` where whitespace in the input string was not properly preserved in the output string.</p><p>- `mypy` type checking is now run as part of pyparsing's CI.</p><p>- Exception message format can now be customized, by overriding `ParseBaseException.format_message`.</p><p>Full release notes here: <a href="https://github.com/pyparsing/pyparsing" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/pyparsing/pyparsing</span><span class="invisible"></span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>Attention pyparsing users: I just pushed release 3.2.0b1 which mostly just drops support for Python 3.6-3.8, but also changes some exception messages. Please give this release a try before I push the final release in early October.</p><p>Also includes:<br>- some nice enhancements to mongodb_query_expression.py<br>- a parser for the Lox language defined in Robert Nystrom's "Crafting Interpreters"</p><p>Full release notes here: <a href="https://github.com/pyparsing/pyparsing/releases/tag/3.2.0b1" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pyparsing/pyparsing</span><span class="invisible">/releases/tag/3.2.0b1</span></a></p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/mongodb" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mongodb</span></a> <a href="https://fosstodon.org/tags/pymongo" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pymongo</span></a> <a href="https://fosstodon.org/tags/craftinginterpreters" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>craftinginterpreters</span></a></p>
Paul McGuire<p>Refreshing my MongoDB skills this week, and I remember thinking it would be nice to have a converter for query expressions, to transform normal infix notation into the nested dict used by the `collection.find()` function. So here is the output of a pyparsing program to do that. See the before/after examples below. The script is included in the pyparsing examples directory at <a href="https://github.com/pyparsing/pyparsing/blob/master/examples/mongodb_query_expression.py" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pyparsing/pyparsing</span><span class="invisible">/blob/master/examples/mongodb_query_expression.py</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/mongodb" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mongodb</span></a></p>
Paul McGuire<p>Just to report that my 3 open source packages pyparsing, littletable, and logmerger (and by extension, textual, which is used by logmerger) all run successfully on Python 3.13b2 (default build) <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/python313" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python313</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/littletable" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>littletable</span></a> <a href="https://fosstodon.org/tags/logmerger" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>logmerger</span></a> <a href="https://fosstodon.org/tags/textual" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>textual</span></a></p>
Paul McGuire<p>Got an issue submitted for pyparsing this week, and it retraces some steps I've written up before. So I put together another pyparsing blog post, walking through this common pitfall for pyparsing beginners: <a href="https://thingspython.wordpress.com/2024/06/01/repetition-in-pyparsing-why-is-it-so-dumb/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">thingspython.wordpress.com/202</span><span class="invisible">4/06/01/repetition-in-pyparsing-why-is-it-so-dumb/</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/parsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsing</span></a></p>
Paul McGuire<p>And, the 1000th pyparsing question was just posted on SO, and it's a nice one! Plus, it was answered by 31-rep user aRTy! (with only a slight bug in their answer, but they had the right idea) <a href="https://stackoverflow.com/questions/78430312/how-to-get-pyparsing-to-match-1-day-or-2-days-but-fail-1-days-and-2-day" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">stackoverflow.com/questions/78</span><span class="invisible">430312/how-to-get-pyparsing-to-match-1-day-or-2-days-but-fail-1-days-and-2-day</span></a> <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>I just released version 3.1.0 of <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a>. Compatibility with Python 3.12 and the latest version of railroad-diagrams. Many bugfixes and new features, all the details are here: <a href="https://github.com/pyparsing/pyparsing/releases/tag/3.1.0" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pyparsing/pyparsing</span><span class="invisible">/releases/tag/3.1.0</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>I just pushed release 3.1.0b1 of pyparsing. 3.1.0 will include support for python 3.12, and will be the last release to support 3.6 and 3.7. If your project uses pyparsing, *please* download this beta release (using "pip install -U pyparsing==3.1.0b1") and open any compatibility issues you might have at the pyparsing GitHub repo (<a href="https://github.com/pyparsing/pyparsing" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">github.com/pyparsing/pyparsing</span><span class="invisible"></span></a>). <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Paul McGuire<p>Aaaaaand... it's out! Pyparsing 3.1.0a1 pre-release available for testing. As easy as firing up a new virtual environment and then `pip install pyparsing==3.1.0a1`! <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/parsers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsers</span></a></p>
radicalbits<p>I've been fiddling around with pyparsing for sometime now trying to parse some simple things and I have to give up. The API is a bit confusing for me and I just don't understand the railroad diagrams that it generates. <a href="https://hachyderm.io/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://hachyderm.io/tags/pyparsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyparsing</span></a></p>