Re: [Gimp-developer] Accessing stdin from a Python based GIMP Plugin.

On 9/4/19 6:48 AM, Craig Sanders via gimp-developer-list wrote:
Hello all.

Are there any gotchas that one should be aware of when accessing stdin from
a Python based GIMP Plugin?

The reason I ask, is because I am implementing a Plugin which seems to be
working fine - until such time as I insert the following code into it;

     for line in stdin :

Works fine for me on Linux (assuming you mean 'sys.stdin' and not
'stdin'). This is of course the very stdin stream of the Gimp process.
Just tested with file, pipe, and terminal and all three work.

Can't say the same for Windows, the standard streams for windowed
applications do not have a regular behavior (for instance IIRC you will
hang your plugin if you print more than 8K to sys.stdout).

Not sure it is a good idea anyway to use stdin, you have to restart Gimp
if you want a second run. Why not use a plain file?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]