logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: python bindings & gmainloop: msg#00063

freedesktop.dbus

Subject: Re: python bindings & gmainloop

On Thu, 2005-09-15 at 15:01 -0700, Sean Meiners wrote:

> Ok, so I finally figured out how to get gmainloop to play nice with other
> threads, only to expose an even more interesting problem. When my test
> script is run (attached) it causes a 'Fatal Python error: PyThreadState_Get:
> no current thread' as soon as the gmainloop is entered, but only if threading
> has been initialized and you actually connect to a bus (system or session, it
> makes no difference). Now here's the really interesting part: it all works
> fine if I undo your EmptyMessage patch (diff attached).

I'll take a look. It might just be your connection going out of scope
and you not holding a reference to it somewhere.
>
> >
> > Another point is I recently split out the GLib stuff so anyone is free
> > to implement another main loop adapter. Look at the dbus.py and
> > dbus_glib_bindings.pyx files to see how this is done. Patches are
> > welcome.
>
> I poked around in there, but it calls dbus_connection_setup_with_g_main which
> does all the heavy lifting of gmainloop integration which in turn relies on
> several dbus_connection_set_* functions that aren't exported by the python
> bindings as far as I can tell. So there doesn't seem to be a way to replace
> the gmainloop in the python bindings without direct modification. I was
> hoping to be able to do the gmainloop replacement in my application and leave
> the bindings to you ;) .

The Qt bindings should have something similar to
dbus_connection_setup_with_g_main.






Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo