V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xuboying
V2EX  ›  Python

如何通过 IPC (socket)操作另一个进程里的对象

  •  
  •   xuboying · Feb 2, 2017 · 2710 views
    This topic created in 3376 days ago, the information mentioned may be changed or developed.
    我想在另一个进程里新建对象(涉及到资源复用),想好的手工的做法是进程间建立套接字连接,对象的 API 通过 socket 封装调用。我怕自己又要造轮子了,先来问问是否已有现成的模块实现了这种功能?
    6 replies    2017-02-04 12:05:09 +08:00
    clino
        1
    clino  
       Feb 2, 2017 via Android   ❤️ 1
    rpyc
    jimzhong
        2
    jimzhong  
       Feb 2, 2017   ❤️ 1
    RPC 适合楼主的需求。有个包叫做 Pyro(Python remote object)可以看看
    wwqgtxx
        3
    wwqgtxx  
       Feb 3, 2017
    我也和楼主有一样的需求,所以最后自己造了一个轮子,不过是用 Redis 进行数据交互的
    NoAnyLove
        4
    NoAnyLove  
       Feb 3, 2017
    。。。。。。我希望能早几天看到这个帖子。。。。。。 Orz
    techmoe
        5
    techmoe  
       Feb 3, 2017 via Android
    当自己遇到奇怪的需求时,先花时间想一想这个思路是不是有问题
    另外如果真要是做的话这个就是 RPC 没商量
    vsyf
        6
    vsyf  
       Feb 4, 2017
    openbinder
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2558 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 12:54 · PVG 20:54 · LAX 05:54 · JFK 08:54
    ♥ Do have faith in what you're doing.