X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Futil%2Foptions.py;h=e09ad33575e5fa7499207dfddffd9216bfcc5461;hb=f0dee854c76a1b065550eff5989abff77e87cb32;hp=d6bd95890f1406206878b98576ee56be07ab7206;hpb=d198acb2fec56c29975fbe7ecf593777791feb97;p=myslice.git diff --git a/manifold/util/options.py b/manifold/util/options.py index d6bd9589..e09ad335 100644 --- a/manifold/util/options.py +++ b/manifold/util/options.py @@ -1,11 +1,18 @@ -import sys, optparse, cfgparse +import sys import os.path +import optparse +# xxx warning : this is not taken care of by the debian packaging +# cfgparse seems to be available by pip only (on debian, that is) +# there seems to be another package that might be used to do similar stuff +# python-configglue - Glues together optparse.OptionParser and ConfigParser.ConfigParser +# additionally argumentparser would probably be the way to go, notwithstanding +# xxx Moving this into the parse method so this module can at least be imported +#import cfgparse from manifold.util.singleton import Singleton # http://docs.python.org/dev/library/argparse.html#upgrading-optparse-code - class Options(object): __metaclass__ = Singleton @@ -38,6 +45,7 @@ class Options(object): # get defaults too # Initialize options to default values + import cfgparse cfg = cfgparse.ConfigParser() cfg.add_optparse_help_option(self._opt)