I've a c++ code on my mac that uses non-standard lybraries (in my case, OpenCV libs) and need to compile this so it can be called from other computers (at least from other mac computers). Runned from python. So I've 3 fundamental questions:

How to compile my project so it can be used from python? I've read
that I should create a *.so file but how to do so?
Should it work like a lib, so python calls some specific functions,
chosen in python level?
Or should it contain a main function that is executed from
command line?

Any ideas on how to do so? PS: I'm using the eclipse IDE to compile my c++ project.
Cheers,
How to compile my project so it can be used from python? I've read
  that I should create a *.so file but how to do so?

That depends on your compiler. By example with g++:
g++ -shared -o myLib.so myObject.o

Should it work like a lib, so python calls some specific functions,
  chosen in python level?

Yes it is, in my opinion. It seems do be the "obvious" way, since it's great for the modularity and the evolution of the C++ code.
Calling c++ function, from Python script, on a Mac OSX