[C++-sig] [newbie] wrapping a class with argc and argv

Niall Douglas s_sourceforge at nedprod.com
Tue Jul 13 04:04:19 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12 Jul 2004 at 18:26, Dioselin Gonzalez wrote:

> I would like to have a class in python like this:
> import sys
> myfoo = foo(len(sys.argv), sys.argv)
> 
> How do I define it?  From what I read, I could use arg_from_python or
> a thin wrapper for this, but I can't find any examples on how they
> work.  Would anybody help me with a sample code?

You'll need to hand wrap the char *[]. Look through the c++-sig 
mailing list archives and there's plenty on that.

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBQPNDJMEcvDLFGKbPEQLdzQCgk3SKRshKj0C4vZFfk3CXATonsNgAnjcD
0I5eZbzp6Fgp1GRIfECcr+Le
=CCgs
-----END PGP SIGNATURE-----



More information about the Cplusplus-sig mailing list