open a gzip file when read by argparse

后端 未结 0 798
南笙
南笙 2020-12-03 03:48

I can open a gzip file easily as follows:

import gzip
import sys
file1 = gzip.open(sys.argv[1], \'rb\')

I tried to use argparse:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题