On 2009-09-03 21:07+0200 Werner Smekal wrote: > Hi Brian, > > On Sep 3, 2009, at 3:23 PM, Brian D'Urso wrote: > >> I have a functional wxpython driver for plplot up and running, and I >> attached the needed files: >> >> plplotcapi.i.diff is the changes I had to make in the swig interface >> file to: >> 1) expose pl_cmd(), PLESC_DEVINIT, and PLESC_GETBACKEND to python. >> However, I think the void* in pl_cmd() causes problems with other >> bindings. I am compiling with the python bindings only. >> 2) In order to use pl_cmd(PLESC_GETBACKEND, ...) I added a >> pointer_function to pass an int* to get the result. There may be a >> simpler way. > > I'll have a look at it, or ask our Python experts if these changes are > ok.
Brian, thanks for your contribution to PLplot. Werner, if the release is this weekend, it's probably not a good idea to commit Brian's work because of the plplotcapi.i changes that also affect python. However, if Hazen decides to delay the release until next weekend, I think there is enough time to put Brian's changes into the release. > I need to talk/mail with Allan, what the best way is to include the > wxphyton bindings - if we make them "full" bindings, or add them to > the existing python bindings. We must also change the Cmake build > system, so that these bindings (and the example) are only build if > wxpython is installed. When we deal with this, I suggest we follow what was done with pyqt4. So you would create bindings/wxwidgets/wxpython and use that directory to create the wxpython bindings and put wxpython examples directly into examples/python (or examples/python/wxpython or examples/wxpython if there are going to be many wxpython examples). > > Do you know how one can find out if wxpython is available? So, python > must be available, and if a little python program which imports wx > runs without problem, then everything should be ok, or? In our build system we find out things about python by running python -c "...." see the last few lines in cmake/modules/python.cmake for an example. Here is one possibility for testing wxpython (if that is the name of the associated import module). ir...@raven> python -c "import wxpython" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named wxpython ir...@raven> echo $? 1 The "echo $?" command under bash gives the return code from python which is non-zero indicating that the error occurred. CMake has direct access to the return code from the python command so I think something like ... execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import wxpython" RESULT_VARIABLE HAVE_WXPYTHON OUTPUT_QUIET ERROR_QUIET ) # return codes have reverse of truth value for CMake. if(HAVE_WXPYTHON) set(HAVE_WXPYTHON OFF) else(HAVE_WXPYTHON) set(HAVE_WXPYTHON ON) endif(HAVE_WXPYTHON) ... should work. Probably, this logic for determining HAVE_WXPYTHON should be in the cmake/modules/wxwidgets.cmake file, and you will want to output HAVE_WXPYTHON in our summary. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general