I read the following blog and was impressed with the Python version. (The following article is the Ruby version)
I'll write a note if it's easy for Pythonistas to see.
Reference site
-Two features you should definitely use if you're using a Mac "Automator" and "Services"
You can create it as shown in the screen below.
I will also paste the code so that it is easy to copy.
python -S 2>&1 || echo;
Set as shown in the screen below.
The point is that you can use any text that can be passed to Automator.
It can also be used from the right-click menu or as a shortcut.
Why not try using the services of the original article for Rubyist and this article for Pythonista.
Recommended Posts