* [9fans] Plumber rule for Python tracebacks
@ 2021-08-31 2:21 Ben Hancock
0 siblings, 0 replies; only message in thread
From: Ben Hancock @ 2021-08-31 2:21 UTC (permalink / raw)
I work with Python a lot, and after beginning to write code in acme, I
thought it would be neat to have a plumber rule to easily jump to the
origin of errors with Mouse-3. Here's what I came up with:
# Easily jump to the origin of Python Tracebacks
type is text
data matches 'File \"([A-Za-z_\-\/]+\.py)\", line ([0-9]+)'
arg isfile $1
data set $file
attr add addr=$2
plumb to edit
plumb client $editor
This may be obvious to many who are more experienced with acme, but I
figured I would share in case it's helpful. So far it works pretty well!
I don't often come across modules with numbers in the filename, but one
could add a 0-9 in the first regex to handle that as well.
I put this in $HOME/lib/plumber and make sure to start the plumber
before firing up acme.
Anyone else have any good tips for working with Python in acme?
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-31 2:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 2:21 [9fans] Plumber rule for Python tracebacks Ben Hancock
9fans - fans of the OS Plan 9 from Bell Labs
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://inbox.vuxu.org/9fans
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 9fans 9fans/ https://inbox.vuxu.org/9fans \
Example config snippet for mirrors.
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git