[code] Re: Python and events.FILE_AFTER_SAVE

From: Richard Philips <richard.philips.att.gmail.com>
Date: Tue, 29 Apr 2014 12:22:11 +0200

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 - 06:22:11 EDT

This archive was generated by hypermail 2.2.0 : Tue 29 Apr 2014 - 06:51:48 EDT