[omniORB] [help] [beginner] cannot run naming service examples
from python chapter 2 "The Basics"
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:
127.0.1.1 abayley-desktop desktop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
> 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:
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