Embedding Python in C++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jethro Ma

    Embedding Python in C++

    Here is what I have:
    ....
    pName = PyString_FromSt ring("btdownloa dheadless");
    pargs = PyString_FromSt ring("argv = 'foo.torrent'") ;
    PyImport = PyImport_Import ModuleEx
    ("btdownloadhea dless",pargs, pargs, 0);
    ....

    I have a feeling my pargs is wrong. How do I make it so that it is
    the equivalent of typing

    btdownloadheadl ess.py --responsefile=fo o.torrent

    in the command line


Working...