|
1 | 1 | # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb. |
2 | 2 |
|
3 | 3 | # %% auto 0 |
4 | | -__all__= ['Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs','msg_idx', |
5 | | -'add_html','add_msg','del_msg','update_msg','url2note','ast_py','ast_grep','read_msg','run_msg', |
6 | | -'msg_insert_line','msg_str_replace','msg_strs_replace','msg_replace_lines','load_gist','gist_file', |
7 | | -'import_string','is_usable_tool','mk_toollist','import_gist','tool_info','fc_tool_info','asdict'] |
| 4 | +__all__= ['dh_port','Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs', |
| 5 | +'msg_idx','add_html','add_msg','del_msg','update_msg','url2note','ast_py','ast_grep','read_msg', |
| 6 | +'run_msg','msg_insert_line','msg_str_replace','msg_strs_replace','msg_replace_lines','load_gist', |
| 7 | +'gist_file','import_string','is_usable_tool','mk_toollist','import_gist','tool_info','fc_tool_info', |
| 8 | +'asdict'] |
8 | 9 |
|
9 | 10 | # %% ../nbs/00_core.ipynb |
10 | 11 | importjson,importlib,linecache |
@@ -38,10 +39,12 @@ def find_var(var:str): |
38 | 39 | raiseValueError(f"Could not find{var} in any scope") |
39 | 40 |
|
40 | 41 | # %% ../nbs/00_core.ipynb |
| 42 | +dh_port=5001 |
| 43 | + |
41 | 44 | defcall_endp(path,dname='',json=False,raiseex=False,**data): |
42 | 45 | ifnotdname:dname=find_dname() |
43 | 46 | data['dlg_name']=dname |
44 | | -res=xpost(f'http://localhost:5001/{path}',data=data) |
| 47 | +res=xpost(f'http://localhost:{dh_port}/{path}',data=data) |
45 | 48 | ifraiseex:res.raise_for_status() |
46 | 49 | try:returnres.json()ifjsonelseres.text |
47 | 50 | exceptExceptionase:returnstr(e) |
|