Re: [Orbit-python-list] stuck
Status: Inactive
Brought to you by:
tack
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 |