Is it possible to use software-center and aptdaemon together?

Asked by Dmitry Shachnev

I have the following Python code:

import sys
from aptdaemon import client
from PyQt4.QtGui import *
from softwarecenter.apt.aptcache import AptCache
apt_client = client.AptClient()
apt_cache = AptCache()
app = QApplication(sys.argv)
sys.exit(app.exec_())

(/usr/lib/python2.6/dist-packages/softwarecenter is a link to /usr/share/software-center/softwarecenter/)
When I run it, Python (2.6) crashes with SIGSEGV.
I need software-center modules for displaying lists of packages in category, and aptdaemon to install them. This code is just an example of crash, the real code I need is of course bigger.
Am I doing something wrong, or it's a bug?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Solved by:
Dmitry Shachnev
Solved:
Last query:
Last reply:
Revision history for this message
Dmitry Shachnev (mitya57) said :
#1

Program received signal SIGSEGV, Segmentation fault.
0x0805fd46 in PyObject_Call (func=<instancemethod at remote 0xb7ba5374>, arg=
    (), kw=0x0) at ../Objects/abstract.c:2490
2490 ../Objects/abstract.c: No such file or directory.
 in ../Objects/abstract.c

Revision history for this message
Dmitry Shachnev (mitya57) said :
#2

Oh! There is even no need of aptdaemon in this crash! It's probably my fault.