scripts: add argparse module for Python 2.6 compatibility

The minimum Python version supported by QEMU is 2.6.  The argparse
standard library module was only added in Python 2.7.  Many scripts
would like to use argparse because it supports command-line
sub-commands.

This patch adds argparse.  See the top of argparse.py for details.

Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Message-id: 20170825155732.15665-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2017-08-25 16:57:30 +01:00
parent c3a8fe331e
commit 47e1cb1f0a
2 changed files with 2676 additions and 0 deletions

2406
scripts/argparse.py Normal file

File diff suppressed because it is too large Load diff