Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

import argparse 

import logging 

 

 

class EnableVerbose(argparse.Action): 

def __call__(self, parser, namespace, values, option_string=None): 

root = logging.getLogger() 

root.setLevel(logging.DEBUG) 

 

 

def get_arg_parser(): 

""" Creates own arguments parser and return it as an object. 

""" 

parser = argparse.ArgumentParser() 

parser.add_argument('--resource', 

action='append', 

required=True, 

help='resource format: sockname,[connect/bind],sock_type,ip_address,port' 

) 

parser.add_argument('--disable-ipv6', 

action='store_true', 

help='Disable IPv6 mode of ZMQ sockets' 

) 

parser.add_argument('-v', '--verbose', 

nargs=0, 

action=EnableVerbose, 

help="Enables debug mode in logger" 

) 

return parser