C, C++ Interface with Python -


i have c++ code has grown exponential. have number of variables (mostly boolean) need changed each time run code (different running conditions). have done using argument command line inputs main( int argc, char* argv[]) function in past.

since method has become cumbersome (i have 18 different running conditions, hence 18 different argument :-( ), move interfacing python (if need bash ). ideally code python script, set values of data members , run code.

does have pointer/information me out? better still simple coded example or url up.

edit original question:

sorry don't think clear question. don't want use main( int argc, char* argv[]) feature in c++. instead of setting variables on command line. can use python declare , initialize data members in c++ code?

thanks again mike

interfacing between c/c++ , python heavily documented , there several different approaches. however, if you're setting values may overkill use python, more geared toward customising large operations within process farming off interpreter.

i recommend researching "ini" file method, either traditionally or using xml, or lighter scripting language lua.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

c# - how to write client side events functions for the combobox items -

ssh client with paramiko (python) -