unsubscribe

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+andras.pap=coventor....@python.org] On Behalf Of 
Stefan Seefeld
Sent: Friday, January 26, 2018 5:47 PM
To: cplusplus-sig@python.org
Subject: Re: [C++-sig] How can I get access to "argv/argc" command line in a 
boost python c++ extension?

On 26.01.2018 16:20, Liam Herron wrote:
So I have a boost python extension C++ library.  I would like to access the 
"python commandline" in C++ without having to pass in the "sys.argv" into my 
C++ extension.
Is there a way to do this?   Include some boost python header and read it from 
some init variables or something?

You don't have to pass `sys.argv` as an argument. You can inspect it from 
wherever you need it. Just import `sys` and inspect the elements of `sys.argv`, 
just as you would do in Python.

[Stefan]

--



      ...ich hab' noch einen Koffer in Berlin...


_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to