The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

Paul St George email at paulstgeorge.com
Sun May 27 13:59:41 EDT 2018


So, on Unix I would use

Image.show(title=None, nameofdisplayutilty), or Image.show(title=None, 
scriptname) #where script with name scriptname invokes the program

I will try this now! And thank you.


On 26/05/2018 19:30, Dennis Lee Bieber wrote:
> On Sat, 26 May 2018 17:17:42 +0200, Paul St George <email at paulstgeorge.com>
> declaimed the following:
>
>> And, out of curiosity, as I will probably use a different method - how
>> do I find out what commands can be used as parameters for show()? I read
>> the docs at
>> <https://pillow.readthedocs.io/en/5.1.x/reference/Image.html#PIL.Image.Image.show>,
>> but I am none the wiser.
>>
> 	AS the examples ("On OS-of-choice...") illustrate... command is any
> external executable program that can handle the temporary file, I presume
> using the name of the temporary and not via redirection of stdin... If you
> have a hex-editor, you could even supply that as "command". If you need to
> provide more than the program name, you may have to instead create a
> shell-script, set it executable, and pass the script name -- have the
> script then invoke the program with the options and forwarding the
> temporary file name to it.
>
>

-- 
Paul St George
http://www.paulstgeorge.com
http://www.devices-of-wonder.com

+44(0)7595 37 1302




More information about the Python-list mailing list