[Users] [Bug 2734] capture stdin in python plugin console

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Wed Nov 21 22:17:58 CET 2012


Holger Berndt <hb at claws-mail.org> changed:

           What    |Removed                     |Added
            Summary|hangs when requesting       |capture stdin in python
                   |'help()' in python plugin   |plugin console
                   |console                     |
           Severity|normal                      |enhancement

--- Comment #6 from Holger Berndt  2012-11-21 22:17:57 ---
I just had a look at the console code, and the problem seems to be quite
straight-forward: stdin isn't redirected. So, when Claws Mail doesn't have a
terminal on stdin, it doesn't hang because EOF gets send immediately (but you
also don't get the interactive prompt). When Claws Mail is started from a
terminal, and you type "help()" in the interactive console, it actually waits
on stdin. So, even though there is nothing hinting at this, you can in fact
enter "quit" into the terminal from which Claws Mail was started, and Claws
Mail stops hanging.

I just commited a patch that captures stdin in the python plugin, and simulates
encountering EOF - so there's no hang anymore.

I'm hijacking this report as an enhancement tracker for real stdin redirection
to the console window. However, to be honest, I don't think this is a terribly
interesting feature (it's somewhat out of the scope that I had in mind for the
console window) - so it's unlikely to happen in the near future.

Configure bugmail: http://www.thewildbeast.co.uk/claws-mail/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Users mailing list