Boost logo

Boost Users :

From: Martin_Thomas_at_[hidden]
Date: 2008-07-15 12:47:28


I am attempting to wrap a C++ library (wrapper included below) and all
seems good until I call the processDoc method around which I have put a
thin wrapper. I get "RuntimeError: St9exception" so to start
trouble-shooting, launched python with strace -e file and then I see
the following:

Traceback (most recent call last):
open("<stdin>", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("<stdin>", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/usr/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/<stdin
>", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/site-packages/lxml-2.1beta1-py2.4-linux-i686.eg
g/<stdin>", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/usr/lib/python2.4/site-packages/pydot-1.0.2-py2.4.egg/<stdin>",
O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("/usr/lib/python2.4/site-packages/pyparsing-1.5.0-py2.4.egg/<stdin>
", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/site-packages/pygccxml-0.9.5-py2.4.egg/<stdin>"
, O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("/usr/lib/python24.zip/<stdin>", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open("/usr/lib/python2.4/<stdin>", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/usr/lib/python2.4/plat-linux2/<stdin>", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/lib-tk/<stdin>", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/usr/lib/python2.4/lib-dynload/<stdin>", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/site-packages/<stdin>", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/site-packages/Numeric/<stdin>",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.4/site-packages/gtk-2.0/<stdin>",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
  File "<stdin>", line 1, in ?

Any clues ?
Thanks // Martin

ProcessorWrapper.cpp:

#include "Processor.h"

#include <boost/python.hpp>

using namespace boost::python;
using namespace Fiddle;

void pDoc(Processor* instance, const std::wstring& inFile, const
std::wstring& outFile) {
  instance->processDoc(inFile, outFile);
}

BOOST_PYTHON_MODULE(Processor)
{

  class_<Processor, boost::noncopyable>("Proc", no_init)
    
    .def("instance", &Processor::Instance,
return_value_policy<reference_existing_object>())
    .staticmethod("instance")

    .def("setSchemaDir", &Processor::setSchemaDir)
    .def("getSchemaDir", &Processor::getSchemaDir)
    .def("processDoc", pDoc)
   ;

}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net