[omniORB] [help] [beginner] cannot run naming service examples from python chapter 2 "The Basics"

Alistair Bayley alistair at abayley.org
Fri Sep 2 10:19:12 BST 2011

On 1 September 2011 23:00, Duncan Grisby <duncan at grisby.org> wrote:

> What's in the IPv6 stuff?  Another reference for localhost perhaps?

Sorry, here's the entire file:	localhost	abayley-desktop desktop	pyramid1	wsoss1	pyramid2	wsoss2	fms-poll-1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

> It's a really bad idea to look at the generated code. It's ugly and
> confusing. You should just read the Python mapping spec and trust that
> omniORBpy follows it correctly:
> http://www.omg.org/spec/PYTH/1.2/

Ah, that helps a bit, thanks. I was looking for this information in
the omniORBpy docs.

It helped to look at the generated code (in the absence of other
information); e.g. I figured out I could write fmsWatchdog.ok to
reference the enum value.

> Why do you want the integer value of it?  You are meant to just use the
> symbolic name. As the Python mapping says in section 1.3.3:
>        "An enumeration is mapped into a number of constant objects in
>        the name space where the enumeration is defined. An application
>        may only test for equivalence of two enumeration values, and not
>        assume that they behave like numbers."

Well, that makes it clearer what I should do. There is already a
mapping in my domain (from enum to ints); I was simply hoping that
such a mapping was part of the enum spec, so I could take advantage of
it, rather than write it myself.


More information about the omniORB-list mailing list