From: Maurice L. <mj...@ga...> - 2002-06-24 08:11:42
|
Alan W. Irwin writes: > Maurice, this is mostly directed to you. > > With the new python interface I am getting the following stack trace from > the tk driver when I invoke > > ./pythondemos.py -dev tk > > bad window path name ".pythondemos.py" > while executing > "plframe $w.plwin -relief sunken" > (procedure "plxframe" line 20) > invoked from within > "plxframe $w $client_id" > (procedure "plw_create" line 2) > invoked from within > "plw_create .pythondemos.py tk" > ("after" script) There may be *two* errors -- 'bad window path name ".pythondemos.py"' makes me immediately look at that second "." as the probable culprit, since Tcl/Tk use .'s to delimit parent-child widget names. So I bet if that last '.py' were stripped off, it'd work. > With the old python interface I get no such error, but the name of the > window (displayed by the desktop environment at the top of the window and > also displayed by the tk driver in the second line) are the garbage > characters "le" so I suspect the problem has been occurring all along. No idea, yet. > If I do something like > > ./x02c -dev tk > > The window name is displayed as "x02c". > > If I use the fortran front end, > > ./x02f > > and select the tk device, the window name is displayed as "plclient". > > If I use the java front end > > java plplot.examples.x02 -dev tk > > the window name is displayed as "plclient_1". > > I believe there must be some assumptions in the tk driver about what the front > end is supposed to supply, and I suspect neither the old or new python > front ends have done the job properly. > > Maurice, could you have a quick dig around to find out what must be supplied > by all front ends so the window name works properly with the tk driver? Once > I know that information, I can see what is missing from the python front end > (or what is being wrongly supplied [say through some name-clash] that is > confusing the tk driver). The tk driver uses: /* Initialize top level window */ /* Request a variant on pls->program (if set) for the main window name */ if (pls->program == NULL) pls->program = "plclient"; to set the window name. pls-program is set by $0 passed to the plargs facility, unless the caller specifies the PL_PARSE_NOPROGRAM option. So you should just need to pass argc/argv without having munged it ($0 at least) to plParseOpts. -- Maurice LeBrun mj...@ga... Research Organization for Information Science and Technology of Japan (RIST) |