Re: [code] Re: Python and events.FILE_AFTER_SAVE

From: Carlos Pita <carlosjosepita.att.gmail.com>
Date: Tue, 29 Apr 2014 08:05:41 -0300

Hello all,

Related to this, arch follow the convention of naming everything python 2
with a trailing 2 (as in python2 or ipython2). I guess other distributions
could be following the similar 3 convention. Wouldn't it be worth
considering this fact along the version detection logic in FILE_AFTER_SAVE
or using the contents of compile_commands so as the user get the chance to
customize the interpreter version (according to the shebang line or to his
heart contents) without copy&pasting the entire event handler?

Cheers

--
Carlos
On Apr 29, 2014 7:23 AM, "Richard Philips" <richard.philips.att.gmail.com>
wrote:
> Hallo Robert,
>
> thank you for your answer.
>
>
> I have to look into this to see if I can organise it but it looks
> promising.
>
> (All textadept code in my work environment (10 developers) - more than 50
> scripts - is installed  by a Python script :-)
>
>
> Richard
>
>
>
>
> On Tuesday, April 29, 2014, Robert Gieseke <rob.g.att.web.de> wrote:
>
>> Hi Richard,
>>
>> Am 29/04/14 10:37, schrieb Richard Philips:
>>
>>> Hi Mitchell,
>>>
>>>
>>> In the Python language module, there is a syntax check connected to the
>>> FILE_AFTER_SAVE event.
>>>
>>> In our environment, this has itsdrawbacks:
>>>
>>> - it leaves unwanted *.pyc files
>>>
>>> - the python version used on the developer's workstation is not the same
>>> as
>>> the version on the server where the software is deployed.
>>>
>>>
>>> Nevertheless, is is an interesting feature :-)
>>>
>>> Would it be possible to  make this feature optional ?
>>>
>>>
>>>
>> given Mitchell's reluctance to add config options you might add
>>
>> events.connect(events.FILE_AFTER_SAVE, function()
>>   if buffer:get_lexer() == 'python' then return true end
>> end, 1)
>>
>> to your post_init.lua to stop syntax checking
>> or delete any unwanted files in a similar event (without the parameter
>> '1' of course)
>>
>> Hope this helps,
>> Robert
>>
>> --
>> 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.
>>
>>
-- 
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 Tue 29 Apr 2014 - 07:05:41 EDT

This archive was generated by hypermail 2.2.0 : Wed 30 Apr 2014 - 06:26:51 EDT