V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
lookatme

咨询 go- Python ,使用 https://github.com/sbinet/go- Python 中遇到一些困惑

  •  
  •   lookatme · Feb 16, 2023 · 1692 views
    This topic created in 1179 days ago, the information mentioned may be changed or developed.

    最近有个需求是需要在 golang 中执行动态的 python 脚本,并获取执行过程中修改的某些 object ;

    研究了一下后发现如 python.PyRun_SimpleString(“”)这类 api 只能返回执行状态,无法获取执行过程中的参数;而 python.PyImport_ImportModule()之类的方法返回的 pyobject 又没有提供类似 PyRun_SimpleString()这种执行 python 脚本的功能

    想咨询下各位有什么好的解决办法么

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 853ms · UTC 21:39 · PVG 05:39 · LAX 14:39 · JFK 17:39
    ♥ Do have faith in what you're doing.