# simple_python_cpp_communication **Repository Path**: ZhangLanTao/simple_python_cpp_communication ## Basic Information - **Project Name**: simple_python_cpp_communication - **Description**: python与c++的进程通信简单示例 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-04-19 - **Last Updated**: 2023-04-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### cpp编译 ```shell cd cpp/test/build cmake .. && make -j4 ``` ### 管道通信 1. python-cpp ```shell # 终端1 python python/fifo_node1_test.py # 终端2 cpp/test/build/fifo_node2_test ``` 2. cpp-cpp ```shell # 终端1 cpp/test/build/fifo_node1_test # 终端2 cpp/test/build/fifo_node2_test ``` 3. python-python ```shell # 终端1 python python/fifo_node1_test.py # 终端2 python python/fifo_node2_test.py ``` ### socket通信 1. python-cpp ```shell # 终端1 python python/socket_server.py # 终端2 cpp/test/build/socket_clien_test ``` 2. cpp-cpp ```shell # 终端1 cpp/test/build/socket_server_test # 终端2 cpp/test/build/socket_clien_test ``` 3. python-python ```shell # 终端1 python python/socket_server.py # 终端2 python python/socket_client.py ``` ### 共享内存 1. python-python(未同步) ```shell # 终端1 python python/mmap_node1.py # 终端2 python python/mmap_node2.py ``` 2. cpp-cpp(同步) ```shell # 终端1 cpp/test/build/sm_server # 终端2 cpp/test/build/sm_client ```