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

2018-05-31 Thread Paul St George
That's what I wanted! But, I didn't know the question because I didn't know the answer. On 30/05/2018 23:09, Karsten Hilbert wrote: On Wed, May 30, 2018 at 11:01:17PM +0200, Peter J. Holzer wrote: On 2018-05-30 22:08:45 +0200, Paul St George wrote: Ha! No, my question was clumsy. If I

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

2018-05-30 Thread Chris Angelico
On Thu, May 31, 2018 at 9:34 AM, Cameron Simpson wrote: > On 30May2018 21:29, MRAB wrote: >> >> On 2018-05-30 21:01, Paul St George wrote: >>> >>> Is this equivalent? >>> p = subprocess.Popen('display', + imagepath) >>> >> p = subprocess.Popen(['display', imagepath]) >> >>> so >>> >>> p =

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

2018-05-30 Thread Cameron Simpson
On 30May2018 21:29, MRAB wrote: On 2018-05-30 21:01, Paul St George wrote: Is this equivalent? p = subprocess.Popen('display',  + imagepath) p = subprocess.Popen(['display', imagepath]) so p = subprocess.Popen('display',  'test.png') p = subprocess.Popen(['display', 'test.png'])

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

2018-05-30 Thread Karsten Hilbert
On Wed, May 30, 2018 at 11:01:17PM +0200, Peter J. Holzer wrote: > On 2018-05-30 22:08:45 +0200, Paul St George wrote: > > Ha! No, my question was clumsy. > > > > If I know the name of the viewer that I want to use (say for example: > > ‘ImageMagick’), where do I find the argument that should be

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

2018-05-30 Thread Peter J. Holzer
On 2018-05-30 22:08:45 +0200, Paul St George wrote: > Ha! No, my question was clumsy. > > If I know the name of the viewer that I want to use (say for example: > ‘ImageMagick’), where do I find the argument that should be used in a line > of code such as this: > >

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

2018-05-30 Thread MRAB
On 2018-05-30 21:01, Paul St George wrote: True, but I wanted to have some control over the image window, fullscreen, colour depth, etc. I am also exploring pygame. I will try your suggestion as it is so much simpler. Being a novice, I had been frightened off using shell=True. See

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

2018-05-30 Thread Paul St George
Ha! No, my question was clumsy. If I know the name of the viewer that I want to use (say for example: ‘ImageMagick’), where do I find the argument that should be used in a line of code such as this: ImageShow.register(MyViewer("gwenview"), -1) I want to replace ‘gwenview’ with the name of

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

2018-05-30 Thread Paul St George
True, but I wanted to have some control over the image window, fullscreen, colour depth, etc. I am also exploring pygame. I will try your suggestion as it is so much simpler. Being a novice, I had been frightened off using shell=True. See

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

2018-05-29 Thread Ian Kelly
On Sat, May 26, 2018 at 9:17 AM, Paul St George wrote: > Thank you. > You are very right. The show() method is intended for debugging purposes and > is useful for that, but what method should I be using and is PIL the best > imaging library for my purposes? I do not want to manipulate images, I

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

2018-05-29 Thread Steven D'Aprano
On Tue, 29 May 2018 20:02:22 +0200, Paul St George wrote: > Is there, somewhere, a list of viewers and their names (for the purposes > of this script)? Do you mean a list of programs capable of viewing graphics? Do you think there is some sort of central authority that registers the names of

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

2018-05-29 Thread Paul St George
Is there, somewhere, a list of viewers and their names (for the purposes of this script)? I am assuming that if I want to ImageMagick (for example), there would be some shorter name - such as 'magick' - and it would be lower case . On 29/05/2018 08:58, Peter Otten wrote: Paul St George

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

2018-05-29 Thread Paul St George
I tried this anyway. The error was:     non-keyword arg after keyword arg On 27/05/2018 21:51, Dennis Lee Bieber wrote: On Sun, 27 May 2018 19:59:41 +0200, Paul St George declaimed the following: So, on Unix I would use Image.show(title=None, nameofdisplayutilty), or

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

2018-05-29 Thread Paul St George
Thank you. For the advice, and for the new word 'monkeypatch'. On 27/05/2018 23:58, Cameron Simpson wrote: On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv’ (in five

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

2018-05-29 Thread Paul St George
Should the PIL code be corrected? On 28/05/2018 06:34, Christian Gollwitzer wrote: Am 27.05.18 um 23:58 schrieb Cameron Simpson: On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py,

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

2018-05-29 Thread Peter J. Holzer
On 2018-05-28 06:34:30 +0200, Christian Gollwitzer wrote: > I think this is a bug/misfeature in the PIL code. On all 3 major platforms > there is a way to invoke the standard program for a given file or URL. On > Windows, it is "cmd.exe /c start ...", on OSX it is "open " and on Linux > it is

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

2018-05-29 Thread Peter Otten
Paul St George wrote: > This is very helpful indeed, thank you. Awe-inspiring. > > It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv’ > (in five places) with the utility of my choice and using ‘executable’ as > the command. > > Or, is this just not done? No, this tends to

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

2018-05-27 Thread Christian Gollwitzer
Am 27.05.18 um 23:58 schrieb Cameron Simpson: On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv’ (in five places) with the utility of my choice and

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

2018-05-27 Thread Cameron Simpson
On 27May2018 20:15, Paul St George wrote: This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv’ (in five places) with the utility of my choice and using ‘executable’ as the command. Or, is

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

2018-05-27 Thread Paul St George
This is very helpful indeed, thank you. Awe-inspiring. It occurred to me that I could edit the PIL/ImageShow.py, replacing ‘xv’ (in five places) with the utility of my choice and using ‘executable’ as the command. Or, is this just not done? On 26/05/2018 19:11, Peter Otten wrote: Paul St

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

2018-05-27 Thread Paul St George
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

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

2018-05-26 Thread Peter Otten
Paul St George wrote: > Thank you. > You are very right. The show() method is intended for debugging purposes > and is useful for that, but what method should I be using and is PIL the > best imaging library for my purposes? I do not want to manipulate > images, I only want to show images (full

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

2018-05-26 Thread Paul St George
Thank you. You are very right. The show() method is intended for debugging purposes and is useful for that, but what method should I be using and is PIL the best imaging library for my purposes? I do not want to manipulate images, I only want to show images (full screen) on an external

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

2018-05-25 Thread boB Stepp
On Fri, May 25, 2018 at 6:04 AM, Paul St George wrote: > I am using the Python Imaging Library (PIL), Python 2 and Raspberry Pi 3 B+ > > My code is simply: > > from PIL import Image > > im = Image.open(‘somepic.jpg’) > im.show() # display image > > > But the