##// END OF EJS Templates
Import argparse directly from stdlib
Thomas Kluyver -
Show More
@@ -24,11 +24,11 b' Authors'
24 #-----------------------------------------------------------------------------
24 #-----------------------------------------------------------------------------
25
25
26 import __builtin__ as builtin_mod
26 import __builtin__ as builtin_mod
27 import argparse
27 import os
28 import os
28 import re
29 import re
29 import sys
30 import sys
30
31
31 from IPython.external import argparse
32 from IPython.utils.path import filefind, get_ipython_dir
32 from IPython.utils.path import filefind, get_ipython_dir
33 from IPython.utils import py3compat, warn
33 from IPython.utils import py3compat, warn
34 from IPython.utils.encoding import DEFAULT_ENCODING
34 from IPython.utils.encoding import DEFAULT_ENCODING
@@ -50,9 +50,9 b' Inheritance diagram:'
50 #
50 #
51 # The full license is in the file COPYING.txt, distributed with this software.
51 # The full license is in the file COPYING.txt, distributed with this software.
52 #-----------------------------------------------------------------------------
52 #-----------------------------------------------------------------------------
53 import argparse
53
54
54 # Our own imports
55 # Our own imports
55 from IPython.external import argparse
56 from IPython.core.error import UsageError
56 from IPython.core.error import UsageError
57 from IPython.utils.process import arg_split
57 from IPython.utils.process import arg_split
58 from IPython.utils.text import dedent
58 from IPython.utils.text import dedent
@@ -6,9 +6,9 b''
6 # The full license is in the file COPYING.txt, distributed with this software.
6 # The full license is in the file COPYING.txt, distributed with this software.
7 #-----------------------------------------------------------------------------
7 #-----------------------------------------------------------------------------
8
8
9 import argparse
9 from nose.tools import assert_equal
10 from nose.tools import assert_equal
10
11
11 from IPython.external import argparse
12 from IPython.core.magic_arguments import (argument, argument_group, kwds,
12 from IPython.core.magic_arguments import (argument, argument_group, kwds,
13 magic_arguments, parse_argstring, real_name)
13 magic_arguments, parse_argstring, real_name)
14
14
@@ -50,6 +50,7 b' To find the directory where IPython would like MathJax installed:'
50 # Imports
50 # Imports
51 #-----------------------------------------------------------------------------
51 #-----------------------------------------------------------------------------
52
52
53 import argparse
53 import os
54 import os
54 import shutil
55 import shutil
55 import sys
56 import sys
@@ -59,7 +60,6 b' import zipfile'
59
60
60
61
61 from IPython.utils.path import locate_profile
62 from IPython.utils.path import locate_profile
62 from IPython.external import argparse
63 #-----------------------------------------------------------------------------
63 #-----------------------------------------------------------------------------
64 #
64 #
65 #-----------------------------------------------------------------------------
65 #-----------------------------------------------------------------------------
@@ -1,11 +1,11 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # -*- coding: utf8 -*-
2 # -*- coding: utf8 -*-
3 import argparse
4 import traceback
5 import json
3
6
4 from IPython.external.jsonschema import Draft3Validator, validate, ValidationError
7 from IPython.external.jsonschema import Draft3Validator, validate, ValidationError
5 import IPython.external.jsonpointer as jsonpointer
8 import IPython.external.jsonpointer as jsonpointer
6 from IPython.external import argparse
7 import traceback
8 import json
9
9
10 def nbvalidate(nbjson, schema='v3.withref.json', key=None,verbose=True):
10 def nbvalidate(nbjson, schema='v3.withref.json', key=None,verbose=True):
11 v3schema = resolve_ref(json.load(open(schema,'r')))
11 v3schema = resolve_ref(json.load(open(schema,'r')))
General Comments 0
You need to be logged in to leave comments. Login now