1/11/2023

How to call module written with argparse in iPython notebook

 


Add this two line above "argparse.ArgumentParser()" line

ex)

..

##add sys code ##
import sys
sys.argv = ['']

##origin code##
import argparse
parser = argparse.ArgumentParser()
args = parser.parse_args()

..


Thx. ๐Ÿ™‡๐Ÿป‍♂️

www.marearts.com

No comments:

Post a Comment