__init__.py
12 lines
| 385 B
| text/x-python
|
PythonLexer
Julian Taylor
|
r10136 | from IPython.utils.version import check_version | ||
Thomas Spura
|
r3408 | try: | ||
import argparse | ||||
MinRK
|
r4669 | # don't use system argparse if older than 1.1: | ||
Julian Taylor
|
r10136 | if not check_version(argparse.__version__, '1.1'): | ||
MinRK
|
r4669 | raise ImportError | ||
else: | ||||
from argparse import * | ||||
from argparse import SUPPRESS | ||||
except (ImportError, AttributeError): | ||||
Thomas Spura
|
r3408 | from _argparse import * | ||
Thomas Kluyver
|
r3456 | from _argparse import SUPPRESS | ||