Thread: [Orbit-python-list] stuck
Status: Inactive
Brought to you by:
tack
From: Frank R. <Fra...@we...> - 2001-10-03 21:56:40
Attachments:
test-server.py
|
All, I got stuck because I cant persuade python-orbit to use INET instead of UNIX-sockets, and I cant find a tiny C example that shows me how to create a server. please, perhaps someone can help me: 1.) Tell me, why the attached python server does not produce IOR with INET profile when started as: ./test-server.py -ORBIIOPUSock=0 2.) Or give me a small example server in C that can be compiled doing "configure" "make", and when running produces IOR with INET profiles. currently I am using ORBit-0.5.8, RH7.1-i386 As long as I dont have a running server producing INET-profiles, I cant go on. Cheers, Frank -- ------------------------------------------------------------- Frank Rehberger <fre...@cs...> ------------------------------------------------------------- "Global order can arise from local interactions." [A.Turing, 1952] ------------------------------------------------------------- "when all nodes have reached that [stable] state, the whole graph is as dead as a doornail and the diffusing computation is defined to have terminated" [E.W.Dijkstra, 1980] ------------------------------------------------------------- |
From: Christian R. R. <ki...@as...> - 2001-10-03 22:11:51
|
On 3 Oct 2001, Frank Rehberger wrote: > I got stuck because I cant persuade python-orbit to use INET instead of > UNIX-sockets, and I cant find a tiny C example that shows me how to > create a server. Are you free to edit orbitrc? You can supply a file like: - orbitrc --- cut here ---- ORBIIOPIPv4=1 - orbitrc --- cut here ---- and stick it in /usr/local/etc/orbitrc or whereever it is that your system searches by default (could be /etc/orbitrc on other systems IIRC). > 1.) Tell me, why the attached python server does not produce IOR with > INET profile when started as: > ./test-server.py -ORBIIOPUSock=0 Well, don't you need IIOIPv4 too? > As long as I dont have a running server producing INET-profiles, I cant > go on. Hey, don't hesitate to write. We don't have a lot of traffic, but it's supposed to be a friendly list. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL |
From: Frank R. <Fra...@we...> - 2001-10-03 22:52:17
|
On Thu, 2001-10-04 at 00:11, Christian Robottom Reis wrote: > On 3 Oct 2001, Frank Rehberger wrote: > > > I got stuck because I cant persuade python-orbit to use INET instead of > > UNIX-sockets, and I cant find a tiny C example that shows me how to > > create a server. > > Are you free to edit orbitrc? You can supply a file like: yes ----------- /etc/orbitrc ----- ORBIIOPIPv4=1 ORBIIOPUSock=0 -- end --- /etc/orbitrc ----- This works, but I assume, after re-login, that the entire GNOME desktop is using this setting now. I did try ./test-server.py -ORBIIOPIPv4=1 -ORBIIOPUSock=0 and also ./test-server.py -ORBIIOPIPv4 1 -ORBIIOPUSock 0 both did not work (orbit-python 0.3, ORBit-0.5.8) > Hey, don't hesitate to write. We don't have a lot of traffic, but it's > supposed to be a friendly list. thanks, it was a prompt help :) > Take care, Cheers, Frank -- ------------------------------------------------------------- Frank Rehberger <fre...@cs...> ------------------------------------------------------------- "Global order can arise from local interactions." [A.Turing, 1952] ------------------------------------------------------------- "when all nodes have reached that [stable] state, the whole graph is as dead as a doornail and the diffusing computation is defined to have terminated" [E.W.Dijkstra, 1980] ------------------------------------------------------------- |
From: Christian R. R. <ki...@as...> - 2001-10-04 00:02:55
|
On 4 Oct 2001, Frank Rehberger wrote: > This works, but I assume, after re-login, that the entire GNOME desktop > is using this setting now. As the applications start, actually, since ORBit only reads this at startup. > I did try > ./test-server.py -ORBIIOPIPv4=1 -ORBIIOPUSock=0 > and also > ./test-server.py -ORBIIOPIPv4 1 -ORBIIOPUSock 0 > > both did not work (orbit-python 0.3, ORBit-0.5.8) Hmmm. Well, I assume you are passing sys.argv on to ORBit, which means it's ignoring the flags. I'll look into orbit's code... Hmmm! Heh, we have a bug in ORBit-Python (Tack, what about those zero bugs there?). Try this patch -- damn, sourceforge is offline so no patch is possible. Okay try doing this: -- line 56 in CORBA__ORB_init() -- for (i = 1; i < argc; i++) { -> swap PyObject *o = PyObject_Repr(PyTuple_GetItem(orb_args, i - 1)); -> for PyObject *o = PyObject_Str(PyTuple_GetItem(orb_args, i - 1)); argv[i] = g_strdup(PyString_AsString(o)); Py_DECREF(o); } -- line 61 -- PyObject_Repr adds single quotes, and is wrong. Using _Str() has corrected the problem here, providing nice handling (this was a bug I ran into a year ago but was too clueless to fix, how funny.) BTW: I very commonly use gdb to track down this sort of problem and since a few people here might want to use it with python, here's a tip. Start python with a "gdb python" and in your script, add the lines import signal, os os.kill(os.getpid, signal.SIGINT) where you want it to stop, and "r foo.py". The script will stop at that point, and you can "break" inside loaded modules and so forth. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL |
From: Christian R. R. <ki...@as...> - 2001-10-04 21:33:16
|
Frank, Tack, the patch that fixes this bug has been checked into cvs. A question for the ORBit ninjas: I would like to provide a test-script for the test-suite so we guarantee this works. Is there a way to query the CORBA orb to know what parameters are currently active in a session? On 4 Oct 2001, Frank Rehberger wrote: > On Thu, 2001-10-04 at 00:11, Christian Robottom Reis wrote: > > On 3 Oct 2001, Frank Rehberger wrote: > > > > > I got stuck because I cant persuade python-orbit to use INET instead of > > > UNIX-sockets, and I cant find a tiny C example that shows me how to > > > create a server. > > > > Are you free to edit orbitrc? You can supply a file like: > yes > > ----------- /etc/orbitrc ----- > ORBIIOPIPv4=1 > ORBIIOPUSock=0 > -- end --- /etc/orbitrc ----- > > This works, but I assume, after re-login, that the entire GNOME desktop > is using this setting now. > > I did try > ./test-server.py -ORBIIOPIPv4=1 -ORBIIOPUSock=0 > and also > ./test-server.py -ORBIIOPIPv4 1 -ORBIIOPUSock 0 > > both did not work (orbit-python 0.3, ORBit-0.5.8) > > > Hey, don't hesitate to write. We don't have a lot of traffic, but it's > > supposed to be a friendly list. > thanks, it was a prompt help :) > > > Take care, > Cheers, Frank > > > Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL |