[Eric] Failure to try PySide
Algis Kabaila
akabaila at pcug.org.au
Mon Oct 25 10:41:24 BST 2010
Hi Detlev,
I am a real fan of Eric - it is a great program and a teaching tool as
well. For this reason i want to draw your attention to a situation
where Eric fails. For the record, I use the binaries from ubuntu
10.10 repositories, including Eric - 4.4.4a (r3717). I attempted to
try our PySide, which in essence is an early incarnation of a clone
of PyQt. My OS is kubuntu 10.10. I suspect that OS is the real
cause of my problems and I am considering of moving to a gnome version
of ubuntu for my programming exercises, which may well make Eric more
robust.
This is my very simple trial program to to test PySide against PyQt:
#!/usr/bin/env python
''' trypyside.py - minimal try program'''
import sys
DEFAULT = 0
# default = 1 -> use PyQt, else use PySide
if DEFAULT:
from PyQt4 import (QtGui, QtCore)
else:
from PySide import (QtGui, QtCore)
class MainWindow(QtGui.QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
frame = MainWindow()
frame.show()
app.exec_()
In Eric it fails on line 19 (app = QtGui.QApplication(sys.argv) with
an error message "The debugger program raised the exception TypeError
"bad argument for a built in operation".
The same program from a command line works OK and here is the dialog:
ak at supremo:/dat/work/PySide/simplest$ ./trypyside.py
(3641) KSharedDataCache::Private::mapSharedMemory: Opening cache
"/var/tmp/kdecache-ak/icon-cache.kcache" page size is 4096
(3641) KSharedDataCache::Private::mapSharedMemory: Attached to cache,
determining if it must be initialized
(3641) KSharedDataCache::Private::mapSharedMemory: Cache fully
initialized -- attached to memory mapping
(3641) KSharedDataCache::Private::mapSharedMemory: 4370432 bytes
available out of 10485760
ak at supremo:/dat/work/PySide/simplest$
There are other glitches in Eric, which I believe is related to the
PyKDE4 that is present due to KDE in kubuntu. I will try to
communicate about these glitches in a separate communication.
Actually, I do not understand how and why PyKDE4 interacts the way it
does with Eric.
Al.
--
Algis Kabaila
http://akabaila.pcug.org.au/
More information about the Eric
mailing list