내용으로 건너뛰기
Out of the Box
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
Fold/unfold all
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
•
2023-12_efficient_large_language_models_a_survey
•
extream_learning_machine
•
2021-07_few-shot_neural_architecture_search
•
2023-06_secrets_of_rlhf_in_large_language_models_part_i_ppo
•
duality_a_new_approach_to_reinforcement_learning
•
command
•
system_monitoring
•
2024-01_seeclick_harnessing_gui_grounding_for_advanced_visual_gui_agents
•
2021-07_perceiver_io_a_general_architecture_for_structured_inputs_outputs
•
2023-10_large_language_models_as_generalizable_policies_for_embodied_tasks
argparse
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== argparse ====== 임의의 타입 parsing 하기 예) bool <code python> def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse.ArgumentTypeError('Boolean value expected.') ... parser.add_argument("--nice", type=str2bool, nargs='?', const=True, default=NICE, help="Activate nice mode.") ... script --nice script --nice <bool> </code> bool 타입 command --feature / command --no-feature 방식 <code python> parser.add_argument('--feature', dest='feature', action='store_true') parser.add_argument('--no-feature', dest='feature', action='store_false') parser.set_defaults(feature=True) </code> * https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse ===== GUI ===== * https://github.com/chriskiehl/Gooey ===== 대체모듈 ====== * https://pypi.org/project/python-decouple/ {{tag>config args argparse}}
argparse.txt
· 마지막으로 수정됨:
2024/03/23 02:38
저자
127.0.0.1
문서 도구
문서 보기
이전 판
역링크
Fold/unfold all
맨 위로