title: Unable to call custom module using Python/C API
body: <p>File structure:</p>
  
  <pre><code>Foo/
       list.so
       main.cpp
       list.cpp
       boost_wrapper.cpp
  </code></pre>
  
  <p><strong>main.cpp</strong> code:</p>
  
  <pre><code>#include &lt;Python.h&gt;
  #include "list.cpp"
  
  
  int main(int argc, char *argv[]){
  
  
      PyObject *pimport;
      pimport=PyString_FromString("list");
      Py_SetProgramName(argv[0]);
      Py_Initialize();
      PyImport_Import(pimport);
      /*PyRun_SimpleString("l=list.LinkedList()");
      PyRun_SimpleString("l.insert(\"N\", 9)");
      PyRun_SimpleString("l.display()");*/
      Py_Finalize();      
  }
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>ImportError: No module named list
  </code></pre>
  
  <p>However if I run python from bash, I'm able to successfully import the module and use all functions defined. I've also tried to import using just PyRun_SimpleString with no avail.</p>
  
  <p>I suspect the current working directory is invisible to the Python Interpreter called by Py_Initialize(). </p>