Hum there is a lot of question here.
what is the advantage of using Cython, vs, say, using the python library directly ?
If you only use Python library (eg: for network stuff), using Cython should not be of great help. Cython will greatly help you if:
- you need access to external C/C++ library;
- or you need to build your own fast data structure possibly using C/C++ allocation;
- or you have an intensive number crunching application.
What should MyString be ?
They are a lot of option here. I usually use
setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("myext", ["myext.pyx", "myextlib.pyx"])])
You'll find a lot of information at Cython compilation documentation For a small library, you can put it in the same directory as the source.