|
|
|
@ -21,20 +21,12 @@ setLocalTranslate('calculate_console',sys.modules[__name__])
|
|
|
|
|
import urllib2
|
|
|
|
|
|
|
|
|
|
from calculate.core.server.methods_func import get_method_argparser, \
|
|
|
|
|
collect_object
|
|
|
|
|
collect_object, RawAndDefaultsHelpFormatter
|
|
|
|
|
|
|
|
|
|
#class help_form (argparse.HelpFormatter):
|
|
|
|
|
# def __init__(self,prog, indent_increment=2, max_help_position=24,
|
|
|
|
|
# width=None):
|
|
|
|
|
# from fcntl import ioctl
|
|
|
|
|
# from array import array
|
|
|
|
|
# import termios
|
|
|
|
|
# h,w=array('h', ioctl(sys.stderr,termios.TIOCGWINSZ,'\0'*8))[:2]
|
|
|
|
|
# argparse.HelpFormatter.__init__(self, prog, indent_increment,
|
|
|
|
|
# max_help_position, w)
|
|
|
|
|
def parse():
|
|
|
|
|
# parser = argparse.ArgumentParser(add_help=False,formatter_class=help_form)
|
|
|
|
|
parser = argparse.ArgumentParser(add_help=False)
|
|
|
|
|
parser = argparse.ArgumentParser(add_help=False,
|
|
|
|
|
formatter_class=RawAndDefaultsHelpFormatter)
|
|
|
|
|
# parser = argparse.ArgumentParser(add_help=False)
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
'-h', '--help', action='store_true', default=False,
|
|
|
|
|
dest='help', help=_("show this help message and exit"))
|
|
|
|
@ -130,7 +122,6 @@ def call_method(client, args, wait_thread):
|
|
|
|
|
raise Exception(1)
|
|
|
|
|
param_object, steps = collect_object(client, param_object, view, args,
|
|
|
|
|
wait_thread)
|
|
|
|
|
|
|
|
|
|
if steps.label and hasattr (param_object, 'CheckOnly'):
|
|
|
|
|
param_object['CheckOnly'] = True
|
|
|
|
|
# print param_object
|
|
|
|
|