<div dir="ltr"><div>Hello,<br><br>Go for Optparse.. Look at below docs on how to use it.<br><br><a href="http://pymotw.com/2/optparse/">http://pymotw.com/2/optparse/</a><br><br></div>Regards,<br>DJ<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 9, 2014 at 5:50 PM, <span dir="ltr"><<a href="mailto:vijnaana@gmail.com" target="_blank">vijnaana@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I need to develop a python CLI framework.<br>
<br>
For example if i need to set an ip address in linux:<br>
<br>
ifconfig eth0 172.16.25.125<br>
<br>
I should be able to use python to do the above.<br>
<br>
1. The user will execute a python script to which i will pass the params eth0 and ip address (something like ifconf.py eth0 172.16.25.125)<br>
<br>
2. Within the script i grab the params and do something to the effect of user executing 'ifconfig eth0 172.16.25.125' from the shell.<br>
<br>
3. There are other such commands for which i will be using python scripts. I came across pyCLI, but it doesn't have much documentation, so couldn't figure out how to move forward.<br>
<br>
4. The CLI framework needs to reuse code so i didn't want to use pure python and develop a framework from scratch. Rather use something like pyCLI/CLIFF.<br>
<br>
The problem is lack of documentation with examples on how to use the above.<br>
<br>
Any guidance would be greatly appreciated.<br>
<br>
Regards & Thanks,<br>
Vij<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>