[Orbit-python-list] Re: orbit-python NameService resolution (was something else)
Status: Inactive
Brought to you by:
tack
From: Jason T. <ta...@li...> - 2000-12-02 14:24:00
|
> This works NOW, I mean, it already works! Don't ask :-) Orbit alrady > handled it, and all we needed was the whitespace fix you Oh yes, that actually makes perfect sense now that I look at the code. :) (Like I said earlier, it's not fresh in my mind these days.) > submitted. (Interesting thing was the IORs had _no_ whitespace, and I > checked for it specifically.. was it something you did internally or just > black magic?) It's something I did internally: p = s + strlen(s) - 1; while (isspace(*p)) *p-- = 0; If it was failing before and it works now, and you think the IOR had no trailing whitespace, have a closer look. :) I was stumped on that same thing too because I was using vi to look at the IOR, and it looked like there was nothing at the end of the line. Of course, od(1) is what you need to use, and I'll bet you the last byte of the IOR has a \n. If not, send me the IOR in question, because I'll definitely want to figure out what's going on. :) > Really, all you need to do is specify the IOR through orbitrc, and you'll > get back a refernce when you resolve "NameService". You have to load_idl > /usr/.../share/idl/name_service.idl to get the class and structure Are you using the CVS version? I wouldn't suggest writting any significant amount of code with the 0.1.x series since 0.2.0 will not be source compatable. With the code in CVS, all you need to do is import CosNaming after you make sure your IDLPATH has an entry for the directory in which the name service IDL is located. (If no IDLPATH is specified it defaults to the cwd.) It's really pretty magical, and probably recommended given that load_idl is an ORBit-Python specific extension and not part of the mapping specification. > One that that _doesn't_ work is specifing the IOR through the commandline, > which would be excellent. Have you ever tried specifying commandline args > through orbit-python? I'll test this further today. I haven't, no, but the code is in place to pass command line args over to ORBit, so it should work. It isn't thoroughly tested mind you, so there could be a bug. Let me know about that and I'll fix it this weekend if there's a problem. Jason. |