May-22-2017, 10:03 AM
People! Greetings from Suriname!!
I try to get this up. What's the way to run this up?
The piece of code :
I try to get this up. What's the way to run this up?
The piece of code :
#!/usr/bin/python # -*- coding: utf-8 -*- import argparse,sys,requests #parser parser = argparse.ArgumentParser(description='MOM.') #diff arguments parser.add_argument('-q', '--queuenum', type=str, dest='SantQue', action='store', help='un numero de queue') parser.add_argument('-b', '--brknum',type=str, dest='brokeName', action='store', default='brk01', help='un num de broker') args = parser.parse_args() print (args) queue=requests.get('h..p://localhost:8161/api/...') brokk=requests.get('h..p://localhost:8161/api/...brokerName={}'.format(args.brokeName),auth=('...')) if args.SantQue: print (queue.json()) else: print ("dong error") #print (queue.json()) #print (queue) #print (mountain.json()) #print (mountain)Sorry for my incompetence