Re: [code] Textadept in the migration from Python2 to Python3

From: Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
Date: Fri, 22 Apr 2016 12:18:40 +0200

Done that in my local copy and it works, Thanks a lot :-)
I'm attaching my python3 "lexer". Will be most probably an overkill, so
fill free to trash.
My only point is to 'promote' this changes into the main textAdept code
base to make it easier for other people.

Best and wonderful weekend
/PA

On 22 April 2016 at 09:54, Arnel <rcl.att.openmailbox.org> wrote:

> On 22 April 2016 09:13AM, Pedro Andres Aranda Gutierrez wrote:
> > I'm not saying that we change TextAdept to work with Python3 only.
> However,
> > you will agree that this will be an issue in the future as more people
> > start migrating. I would suggest that if a solution to this issue is
> found
> > that makes TextAdept work with both Python2 and Python3, it is integrated
> > into the release (i.e. not in the user's init.lua). This will make the
> case
> > for textAdept only stronger :-)
>
> I never suggested changing TA to work _only_ with Python3 - far from it.
>
> The patterns change was to make TA identify scripts with hashbangs ending
> in
> 'python3' as Python3 scripts. However, the latter results in an additional
> field for Python3 scripts, without a separate file extension to accompany
> that
> change. I only pointed out what would happen.
>
> If I misinterpreted how that system works, please correct me.
>
> For syntax-checking Python3 scripts, all I have in my 'init.lua' is:
>
> > textadept.run.syntax_commands.python = function()
> > return ([[python3 -c
> > "compile(open('%f').read(),'%f','exec',0,1)"]]):gsub('%%f',
> > (buffer.filename:gsub('\\', '\\\\\\\\'))) end
> >
> > textadept.run.run_commands.python = 'python3 -u "%f"'
>
> They're almost exact copies of what's in the TA modules, except for the
> Python executable. That's it.
>
> ----
> Thank you,
> Arnel
> --
> 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.
>
>

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellet zu werden
Gerog Kreisler

-- 
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 Fri 22 Apr 2016 - 06:18:40 EDT

This archive was generated by hypermail 2.2.0 : Fri 22 Apr 2016 - 06:52:32 EDT