def get_wsdl_info(self): methods_dict = {} types_list = [] methods = False types = False data = str(self.client) rows = data.split("\n") for row in rows: if "Methods (" in row: methods = True continue if "Types (" in row: methods = False types = True continue if methods: name, rest = row.split('(') name = name.replace(' ','') keep, skip = rest.split(')') args = keep.split(',') methods_dict[name]=[] for arg in args: if arg != ' ': methods_dict[name].append(arg) if types and len(row.replace(' ','')) > 0: row = row.replace(' ','') types_list.append(row) return methods_dict, types_list
def onloadattributes(): Database_param.listWidget.setEnabled(True) Database_param.listWidget.clear() os.chdir(projPath) f = open(r'column.txt', 'r') names = f.readlines() print "names", names f.close() Database_param.listWidget.addItem('name(string)') Database_param.listWidget.addItem('latitude(string)') Database_param.listWidget.addItem('longitude(string)') Database_param.listWidget.addItem('alititude(float)') for name in names: print "appending name", name Database_param.listWidget.addItem(name.replace("\n", "")) Database_param.listWidget.setEnabled(False) return True
def onloadattributes(): Database_param.listWidget.setEnabled(True) Database_param.listWidget.clear() os.chdir(projPath) f = open(r'column.txt','r') names = f.readlines() print "names", names f.close() Database_param.listWidget.addItem('name(string)') Database_param.listWidget.addItem('latitude(string)') Database_param.listWidget.addItem('longitude(string)') Database_param.listWidget.addItem('alititude(float)') for name in names: print "appending name", name Database_param.listWidget.addItem(name.replace("\n","")) Database_param.listWidget.setEnabled(False) return True
def parse_users(self, data): #print "parse users" ret_users = [] users = [[]] name = '' count = None user_mode = True rows = str(data).split('\n') #print "rows:",len(rows) for row in rows: if "BatchCount" in row: name, count = row.split('=') name=name.replace(' ','') count=count.replace(' ','') continue if "(UserDataContract)" in row: user_mode = True users.append([]) continue if ")," in row: user_mode = False continue if user_mode: #print row #print users[-1] if 'Id = ' in row and "Dect" not in row and "Call" not in row and 'Ad' not in row and 'Server' not in row and "Uus" not in row: #print "HIT!" row = row.replace("Id",'uId') users[-1].append(row.replace(' ','')) #print "nbr users:", len(users) #print users #raw_input("raw") for user in users[1:]: tmp = self.parse_user(user) ret_users.append(tmp) return ret_users