Sudo weirdness with QProcess and Python interpreter
Working with PyQt4, trying to do some cheap hacks to get console output in the UI, I stumbled upon QProcess and landed in a weird situation -
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtCore
>>> process = QtCore.QProcess()
>>> process.start("sudo ls")
>>> [sudo] password for ideamonk: mk48d
Notice the "mk48d" there. Well that's not my password, but they are some of the keys that somehow got filtered out and got printed by the interpreter. Indeed this situation wont come up in real life, but its a point to ponder upon as to why do both the processes - sudo and python interpreter split the user input amongst each other.