Hi 9fans,

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?

Cheers,

- Ben

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T96499166b9ef2245-M07ba4887b2862957c74d6126
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to