Embedding Python in C++

J

Jethro Ma

Here is what I have:
....
pName = PyString_FromString("btdownloadheadless");
pargs = PyString_FromString("argv = 'foo.torrent'");
PyImport = PyImport_ImportModuleEx
("btdownloadheadless",pargs, pargs, 0);
....

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

btdownloadheadless.py --responsefile=foo.torrent

in the command line
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,473
Latest member
ChristelPe

Latest Threads

Top