I use 'python3 -m pylint...' rather that just 'pylint'. I was sure there 
was a better way, but that dependes on getting pip/pip3 etc. sorted, and 
life is too short...


On Wednesday, September 22, 2021 at 2:05:50 PM UTC+1 [email protected] 
wrote:

> I use -m all the time, including (mostly) running Leo. and running pip. 
> Another advantage with pip is that you always get the right version of pip, 
> which is really good when you have several versions of Python installed.
>
> On Wednesday, September 22, 2021 at 8:58:41 AM UTC-4 Edward K. Ream wrote:
>
>> A few days ago I had one of those "Why didn't I see this before?" moments.
>>
>> Invoking a python package via `python -m package` is simpler and more 
>> general. For example:
>>
>> python -m black -h
>>
>> There is no need to specify the path to black!
>>
>> We only need to ensure that `python` invokes python 3. We can do this 
>> with an alias (linux) or .cmd file (windows).  Here is my python.cmd file:
>>
>> "C:\Users\Edward Ream\Python\Python39\python.exe" %*
>>
>> Now (in devel) Leo's "blacken-files" command invokes black this way:
>>
>> g.execute_shell_commands(
>>   f"&python -m black --skip-string-normalization {path}")
>>
>> Edward
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f1302821-4abf-46a1-b3f1-27a5951520e9n%40googlegroups.com.

Reply via email to