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/455bb56e-6589-4138-8d76-13aa87b09094n%40googlegroups.com.

Reply via email to