V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
chu8129
V2EX  ›  Python

求問有什么方法可以实现: Python 调用 armeabi-v7a 下的 so 的文件?

  •  
  •   chu8129 ·
    chu8129 · 2017-10-30 17:35:51 +08:00 · 2196 次点击
    这是一个创建于 2362 天前的主题,其中的信息可能已经有所发展或是发生改变。

    求問有什么方法可以实现: ##python 调用 armeabi-v7a 下的 so 的文件?##

    9 条回复    2017-10-31 17:32:49 +08:00
    xingzhi1990
        1
    xingzhi1990  
       2017-10-30 17:56:17 +08:00
    直接 import 不行吗
    pynix
        2
    pynix  
       2017-10-30 18:01:35 +08:00
    ffi 应该有 armv7 的实现。。。
    chinawrj
        3
    chinawrj  
       2017-10-30 19:36:54 +08:00
    python 调用 c 啊。
    ysc3839
        4
    ysc3839  
       2017-10-30 21:23:51 +08:00
    import ctypes
    babyrjw
        5
    babyrjw  
       2017-10-30 21:25:10 +08:00
    Android 么? 我觉得 PC 上应该不行,指令集不一样,可以考虑在 android 上跑 python 来调用,能不能调用成功是个问题。可以考虑在新的 apk 里调用 so,难度要低一点,一般 so 都会做一些简单的验证~
    chu8129
        6
    chu8129  
    OP
       2017-10-31 17:23:52 +08:00
    @xingzhi1990 不行,so 文件不能这么暴力直接
    chu8129
        7
    chu8129  
    OP
       2017-10-31 17:27:06 +08:00
    @chinawrj 64 位 ubuntu 好多问题,泪
    chu8129
        8
    chu8129  
    OP
       2017-10-31 17:30:47 +08:00
    @pynix 好,多谢提醒,我试试
    chu8129
        9
    chu8129  
    OP
       2017-10-31 17:32:49 +08:00
    @babyrjw 我试试,多谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1410 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:53 · PVG 07:53 · LAX 16:53 · JFK 19:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.