I was trying out PyQt4. and tried this code.
import sys
from PyQt4 import QtGui
app = QtGui.QApplication(sys.argv)
window = QtGui.QWidget()
window.show()
print 'end'
This above code works when i try it on on ipython
, But it doesn’t when i write them into a file and run it. I also tried changing the permission by chmod +x
. The code actually runs(the reason i added a print statement at the end to confirm if the code is running till the end), i don’t get a window.
im running python 2.7.6 on ubuntu 14.04