Python Forum
PyRun_String equivalent in stable ABI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyRun_String equivalent in stable ABI
#1
I'd like to translate a Python/C++ project to the stable ABI. The project uses PyRun_String to exec/eval a literal string in Python. That function is not part of the stable ABI. Is there a recommended workaround?
Reply
#2
I would try PyEvalCode() after Py_CompileString(). Both are in the stable ABI.
nschloe likes this post
Reply
#3
(Sep-19-2023, 09:43 AM)Gribouillis Wrote: I would try PyEvalCode() after Py_CompileString(). Both are in the stable ABI.

Thanks, this does the trick!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Long-term stable source to get news headlines with Python? sandufi 4 1,949 Dec-23-2021, 09:48 AM
Last Post: sandufi
  equivalent commands saeed_balk 2 2,704 Sep-23-2018, 05:44 AM
Last Post: saeed_balk
  3.6.2 is latest stable release right? And "path length" Fran_3 3 3,346 Aug-01-2017, 02:04 PM
Last Post: Fran_3

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020