How can I get argparse in Python 2.6?

前端 未结 5 848
庸人自扰
庸人自扰 2020-12-10 10:29

I have some Python 2.7 code written that uses the argparse module. Now I need to run it on a Python 2.6 machine and it won\'t work since argparse was added in 2.7.

I

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 10:54

    you can also get the argparse.py file (e.g. from https://pypi.python.org/pypi/argparse) and put it in the same folder as your main python file.

提交回复
热议问题