Show More
@@ -1,11 +1,12 b'' | |||||
|
1 | from IPython.utils.version import check_version | |||
1 | try: |
|
2 | try: | |
2 | import argparse |
|
3 | import argparse | |
3 | # don't use system argparse if older than 1.1: |
|
4 | # don't use system argparse if older than 1.1: | |
4 |
if argparse.__version__ |
|
5 | if not check_version(argparse.__version__, '1.1'): | |
5 | raise ImportError |
|
6 | raise ImportError | |
6 | else: |
|
7 | else: | |
7 | from argparse import * |
|
8 | from argparse import * | |
8 | from argparse import SUPPRESS |
|
9 | from argparse import SUPPRESS | |
9 | except (ImportError, AttributeError): |
|
10 | except (ImportError, AttributeError): | |
10 | from _argparse import * |
|
11 | from _argparse import * | |
11 | from _argparse import SUPPRESS |
|
12 | from _argparse import SUPPRESS |
General Comments 0
You need to be logged in to leave comments.
Login now