문제

I currently have 2 functions in my .py script.

#1 connects to the database and does some processing.

#2 does some other processing on files

Currently before I run the script, I have to manually comment/uncomment the function I want to run in my main if statement block.

How can I use argparse, so it asks me which function to run when I run my script?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top