본문 바로가기

전체 글30

Programming productivity tools Think of it as a mini awesome list of programming productivity tools: Utility Description jq https://stedolan.github.io/jq/ Utility for manipulating data in the form of JSON documents. Extremely useful for manipulating the output of web APIs directly in the shell. Data is read from standard input and results are printed on standard output. Manipulation is described through a custom domain-specif.. 2022. 11. 8.
Debugging post- mortem debugging 1) 디버깅 모드로 파일 실행 $ python3 -i 2) 디버깅으로 진입 sys.last_traceback 에서 찾은 traceback 의 포스트-모템(post-mortem) 디버깅으로 진입합니다. >>> import pdb >>> pdb.pm() 인터프리터에서 디버깅 실행 >>> import pdb >>> import mymodule >>> pdb.run('mymodule.test()') 실행을 재개하는 아무 명령 (continue, step, next, return, jump, quit 및 해당 명령의 약어들)을 사용 가능 help(h) 기능을 이용하여 단축키 확인 가능 코드에서 breakpoint 사용 import pdb; pdb.set_trace() im.. 2022. 11. 8.
Emulating Python's interactive interpreter ※ 코드 실행 중 대화형 인터프리터 호출 # Emulating Python's interactive interpreter ''' # python 에뮬레이트 import code code.interact() ''' ''' # Example for IPython import IPython IPython.embed() ''' ''' # Example for bpython import bpython bpython.embed() ''' ''' # Example for ptpython from ptpython.repl import embed embed(globals(), locals()) ''' 2022. 11. 8.
PYTHONSTARTUP 환경변수 PYTHONSTARTUP 환경변수 1. 사용자 변수 등록 변수명 : PYTHONSTARTUP 값 : %USERHOME%\.pythonstarttup 변수명 : HOME 값 : %USERHOME% 2. python start up file 준비 저장위치 : C:\Users\ 파일명 수정 및 확장자 삭제 : .pythonstarttup 2022. 11. 8.