From: Alan W. I. <ir...@be...> - 2002-06-24 16:50:03
|
On Mon, 24 Jun 2002, Maurice LeBrun wrote: > [...] So I bet if that last '.py' were > stripped off, it'd work. Yep, that works fine. When I cp pythondemos.py pytest ./pytest -dev tk The plotting works fine and the name (pytest) is displayed properly with the new python interface. To close off the possibility this was python specific I also did this test. cp x08c test.x08c ./test.x08c -dev tk and that invoked the same error. > 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. I checked that that the correct argv string was being passed to the python version of plParseOpts. It is possible the "le" name result we were getting for the old python interface was due to some problem with the python wrapper for plParseOpts, but I haven't investigated further for that situation with the pytest name. But apparently that is not a problem for the new python interface since it delivers the name pytest without a problem. So I guess the only remaining question is how can you change the underlying code so that invoking program names with a "." in them (such as in the above C code test and also in the original python example) are acceptable to the tk driver. Alan |