I need to embed a simple script written in Python into my C application. The script simply downloads some content from the Internet, parses it and prints result into stdout. I need to bind outgoing IP address of every connection made by script, to make use of many IP addresses provided with a server. I can use either Python/C API or C system()/execve() functions. I prefer to do not modify a script itself since it uses liburl2 which doesn't support binding local IP directly.
I would be grateful for every hint.
Regards, Michal Pietras.