コマンドライン引数を解析するために argparser を使用しています。
今、私は次のようなものを持っています
./script.py 1112323 0 --salary 100000 -- age 34
ここで、最初の 2 つは位置引数で、残りはオプションです。
ここで、ユーザーがコマンドラインで入力としてファイル名を指定すると、これらの上記の引数をオーバーライドして、ファイルのヘッダーから引数を取得する機能が必要です。ユーザーが sth like を与えると、私は意味します
id|sequence|age|name|........... (header of the file with first two cols as positional arguments and rest positional)
これをコマンドラインで指定すると:
./script.py -f filename
上記の位置引数について不平を言うべきではありません。
これは私の現在の実装で実行可能ですか?