Passing another args in quote as a arg

9 views
Skip to first unread message

Sart

unread,
Dec 17, 2012, 1:45:42 AM12/17/12
to argpars...@googlegroups.com
Hello,

 ./__main__.py -o folder.class.function -a "-k=key"

I am trying to pass -k=key to a arg, but it thinks -k is another arg and returns unrecognized arg. is there a way to solve it without escaping \-k ?

Actually what i am trying to do is :

my cli app gets module name and function from -o parameter 

-o Folder.Class.Function 

and creates an instance of that class which mentioned in -o and runnes the function. I am trying to attach some other parser args on fly depends on Class/function . I was thinking to create a new parser in class with "-a" value and handle sub part there.

altarnative ways are welcome.

thanks in advance


Reply all
Reply to author
Forward
0 new messages