On Mon, Mar 24, 2014 at 11:37 AM, Edward K. Ream <[email protected]> wrote:
> As some of you know, I recently restarted work on type-related programming
> tools:
> https://groups.google.com/forum/#!topic/python-static-type-checking/Vhy_w5bCH8I
>
> The purpose of this project has always been to create new tools **for Leo**,
> so this is (broadly speaking) still part of the Leo project.

For the last day or so I have been working on making pylint more
usable from Leo.

Today I pushed code that runs pylint in a separate process, thereby
eliminating the need to change pylint's sources in order to run pylint
on multiple files at the same time.  The problem was that pylint ends
with a sys.exit, which will terminate Leo scripts prematurely.  The
workaround was to replace the call to sys.exit inside pylint's Run
class, but naturally that causes all kinds of compatibility problems.

The new code pass something like the following to g.execute_shell_commands:

    <python> -c "import leo.core.leoGlobals as g; g.run_pylint(<args>)"

As you can see, this uses the new g.run_pylint function.

Edward

P.S. This assumes that the leo.core.leoGlobals module is accessible.
This will be so when the code is run from Leo.  My installations also
add the path to leo to sys.path in sitecustomize.py.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to