Regular Expression to match error ouput for Python

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
abulka
Posts: 4
Joined: Thu Jun 12, 2003 2:07 am

Regular Expression to match error ouput for Python

Post by abulka »

Here is the regex Regular Expression you need in order to match error ouput for Python TextPad use. When you run Python on a file, and get an error - you will now be able to double click on the error line (the one with a line number in it) and TextPad will jump you to that line in the source code.

Configure>Preferences>Tools>Python>

^.*"\([^"]+\)", line \([0-9]+\)

(of course you had to create this run tool)
Configure>Preferences>Tools>Add
Command C:\Python22\python.exe
Param $File
Initial folder $FileDir
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

I recommend creating a "regular expressions for search results" post in the HOW TO forum, where people can reply with the REs for many lanugages.

Anyhoo, thanks for the info.
Post Reply