Re: [code] [textadept] Python module - file after save syntax check

From: Mitchell <m.att.foicica.com>
Date: Wed, 17 Jul 2013 12:42:51 -0400 (Eastern Daylight Time)

Robert,

On Thu, 11 Jul 2013, Robert wrote:

> Hi,
>
> there is a bug in the Python module not showing the syntax error messages.
> The error message looks like this:
> File "test.py", line 11
> {
> ^
> SyntaxError: unexpected EOF while parsing
>
> Currently, the pattern expects "SyntaxError" to be at the beginning of
> the error message
>
> Attached are two patches, the first just fixes the matching
> expression, the second (python-file-after-save-keep-position.patch)
> introduces the following behaviour (and would be my preference for
> inclusion):
> - don't change the caret position
> - if the line with the error is on screen, annotate there
> - else, annotate on the current line, additionally display the line
> number where the error was reported

I've applied variants of these patches. It appears Python3 has a different
syntax error message than Python2. I added an additional check to see
which version the user is using.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 17 Jul 2013 - 12:42:51 EDT

This archive was generated by hypermail 2.2.0 : Thu 18 Jul 2013 - 06:29:59 EDT