def __init__(self, name, directory): self.directory = directory self.qtn = QemuTypeName(name) self.struct_name = "{}State".format(self.qtn.for_struct_name) self.state_fields = [] # an interface is either `Macro` or C string literal self.interfaces = OrderedSet()
def __init__(self, file_name): super(Settings, self).__init__( file_name, glob=globals(), version=1.0, # default values schedule_generation=False, recent_projects=OrderedSet())
def result(): if not session_check(): flash('재로그인 해주세요') return redirect(url_for('login')) if request.method == 'POST': result = request.form search_product = result['search_product'].split('\r\n') for idx, search_item in enumerate(search_product): # 특수문자제거, 공백제거 search_product[idx] = re.sub( '[-=+,#/\?:^$.@*\"※~&%ㆍ!』\\‘|\(\)\[\]\<\>`\'…》]', '', search_item).replace(' ', '') # 중복제거 search_product = OrderedSet(search_product) s_data = [] for item in search_product: # 글자수가 1글자 이상일때만 검색 if len(item) > 0: korean_nm = "" start = 0 # 없을시 다음페이지 3 페이지 까지만 while len(korean_nm) < 1 and start < 30: gSearch_result = search_google(item, start, "druginfo") korean_nm = gSearch_result['korean_nm'] start = start + 10 # 그래도 없을 시 kmle로 검색 (kmle 우리랑 성분명 표시하는방법이달라서 내 리스트 잘 못골라옴) start = 0 while len(korean_nm) < 1 and start < 30: gSearch_result = search_google(item, start, "kmle") korean_nm = gSearch_result['korean_nm'] start = start + 10 print(start, gSearch_result) s_data.append(gSearch_result) return render_template("/result_main.html", result=s_data)