• 2007-09-27

    boost python call rationale

     RationaleRef: http://boost.org/libs/python/doc/v2/callbacks.html

    In general, to get Python arguments corresponding to a1...aN, a new Python object must be created for each one; should the C++ object be copied into that Python object, or should the Python object simply hold a reference/pointer to ...
    Tag:
  • 2007-09-26

    python 对epoll的包装 - [python]

    写了python对epoll的包装

    基于Python C API实现

    python extension for epoll moudle on Linux platform
    * usage:
    * import epoll
    * e=epoll.Epoll(1000)
    * while True:
    * #create socket
    * s=socket.socket(...)
    * &nb...

    Tag:Linux Python
  • 2007-09-26

    boost.python.call - [python]

    Ref:http://boost.org/libs/python/doc/v2/callbacks.html 

    The simplest way to call a Python function from C++, given an object instance f holding the function, is simply to invoke its function call operator.

    f("tea", 4, 2) // In Python: f('tea', 4, 2)
    Tag:Python
  • 2007-07-09

    vim 高亮打开 - [Linux]

    if exists("syntax_on") | syntax off | else | syntax enable | endif
    Tag:vim Linux