[pygtk] ORBit and python

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Wed Sep 27 00:10:42 WST 2006


Ter, 2006-09-26 às 16:43 +0100, Magnus Therning escreveu:
> On Tue, Sep 26, 2006 at 11:24:44 +0100, Gustavo J. A. M. Carneiro wrote:
> >On Ter, 2006-09-26 at 11:01 +0100, Magnus Therning wrote:
> >> I copy-pasted your code into three files here and noticed the same
> >> behaviour.  I then went to the PyORBit doc I keep around [1] and tried
> >> the Account example.  I got that to work by moving the "import CORBA" to
> >> after the call to "ORBit.load_file".  So there shouldn't be something
> >> inherently preventing you from using attributes.
> >
> >  You should always import ORBit before CORBA is imported for the first
> >time.  The reason is that "import CORBA" first just imports whatever the
> >default ORB in your system is.. could be omniorb or something like that.
> >If you import ORBit first, pyorbit then provides its own replacement
> >CORBA module.
> 
> Hmmm, interesting.  The code in the examples used to work, but not any
> longer.  I suppose that's an improvement then :-)

  Maybe it worked before because pyORBit was the only python ORB on the
system the last time it worked?

  It is unfortunate other ORBs install a default CORBA.py module in the
python path; "in the face of ambiguity refuse the temptation to guess".

-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic



More information about the pygtk mailing list