command line parsing in s4 net command

tridge at tridge at
Tue Apr 13 22:25:35 MDT 2010

Hi Jelmer,

The current python/C mix for command line parsing in the net command
is a bit tricky, and is causing people problems. We are now order
sensitive for the options on the command line because of the split
between options handled by popt and options handled by optparse in

You mentioned to me the possibility of moving to making net be
primarily a python script, but calling to C, instead of the current
situation where it is primarily C, but calling to python. How far
along is that effort? Do you think that would resolve the command line
parsing problems?

Alternatively we could try to work on tighter integration between
optparse and popt. Perhaps by making the python backend modules pass
back up the list of options to the C based popt code, and thus
register the valid command line options for the C code to handle. This
would mean registering and loading the backend python modules before
the command line processing is done.

What do you think?

Cheers, Tridge

More information about the samba-technical mailing list