我想實現一個庫,我使用Python的C-API爲C編寫了Python。在python我可以只是說出我的模塊中聲明「常量」: RED = "red" # Not really a constant, I know
BLUE = "blue" # but suitable, nevertheless
def solve(img_h):
# Awesome computations
我想在Visual Studio 2012 C++程序中使用Python的C API在嵌入式Python環境中定義的字符串變量的值。 隨着嵌入式環境中,我使用Python 3.4.3 64位,這是我從https://www.python.org/downloads/ 這是下載我使用的Visual Studio 2012的代碼(目標:發行,64): #include <Python.h>
int