##// END OF EJS Templates
remove path from external
MinRK -
Show More
@@ -34,7 +34,6 b' License: MIT open source license.'
34 """
34 """
35 from __future__ import print_function
35 from __future__ import print_function
36
36
37 from IPython.external.path import path as Path
38 import stat, time
37 import stat, time
39 import collections
38 import collections
40 try:
39 try:
@@ -43,6 +42,8 b' except ImportError:'
43 import pickle
42 import pickle
44 import glob
43 import glob
45
44
45 from path import path as Path
46
46 def gethashfile(key):
47 def gethashfile(key):
47 return ("%02x" % abs(hash(key) % 256))[-2:]
48 return ("%02x" % abs(hash(key) % 256))[-2:]
48
49
@@ -8,42 +8,21 b' Inheritance diagram:'
8 :parts: 3
8 :parts: 3
9 """
9 """
10
10
11 #-----------------------------------------------------------------------------
12 # Copyright (C) 2008-2011 The IPython Development Team
13 #
14 # Distributed under the terms of the BSD License. The full license is in
15 # the file COPYING, distributed as part of this software.
16 #-----------------------------------------------------------------------------
17
18 #-----------------------------------------------------------------------------
19 # Imports
20 #-----------------------------------------------------------------------------
21
22 import os
11 import os
23 import re
12 import re
24 import sys
13 import sys
25 import textwrap
14 import textwrap
26 from string import Formatter
15 from string import Formatter
27
16
28 from IPython.external.path import path
29 from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
17 from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
30 from IPython.utils import py3compat
18 from IPython.utils import py3compat
31
19
32 #-----------------------------------------------------------------------------
33 # Declarations
34 #-----------------------------------------------------------------------------
35
36 # datetime.strftime date format for ipython
20 # datetime.strftime date format for ipython
37 if sys.platform == 'win32':
21 if sys.platform == 'win32':
38 date_format = "%B %d, %Y"
22 date_format = "%B %d, %Y"
39 else:
23 else:
40 date_format = "%B %-d, %Y"
24 date_format = "%B %-d, %Y"
41
25
42
43 #-----------------------------------------------------------------------------
44 # Code
45 #-----------------------------------------------------------------------------
46
47 class LSString(str):
26 class LSString(str):
48 """String derivative with a special access attributes.
27 """String derivative with a special access attributes.
49
28
@@ -52,7 +31,7 b' class LSString(str):'
52 .l (or .list) : value as list (split on newlines).
31 .l (or .list) : value as list (split on newlines).
53 .n (or .nlstr): original value (the string itself).
32 .n (or .nlstr): original value (the string itself).
54 .s (or .spstr): value as whitespace-separated string.
33 .s (or .spstr): value as whitespace-separated string.
55 .p (or .paths): list of path objects
34 .p (or .paths): list of path objects (requires path.py package)
56
35
57 Any values which require transformations are computed only once and
36 Any values which require transformations are computed only once and
58 cached.
37 cached.
@@ -84,6 +63,7 b' class LSString(str):'
84 n = nlstr = property(get_nlstr)
63 n = nlstr = property(get_nlstr)
85
64
86 def get_paths(self):
65 def get_paths(self):
66 from path import path
87 try:
67 try:
88 return self.__paths
68 return self.__paths
89 except AttributeError:
69 except AttributeError:
@@ -113,7 +93,7 b' class SList(list):'
113 * .l (or .list) : value as list (the list itself).
93 * .l (or .list) : value as list (the list itself).
114 * .n (or .nlstr): value as a string, joined on newlines.
94 * .n (or .nlstr): value as a string, joined on newlines.
115 * .s (or .spstr): value as a string, joined on spaces.
95 * .s (or .spstr): value as a string, joined on spaces.
116 * .p (or .paths): list of path objects
96 * .p (or .paths): list of path objects (requires path.py package)
117
97
118 Any values which require transformations are computed only once and
98 Any values which require transformations are computed only once and
119 cached."""
99 cached."""
@@ -142,6 +122,7 b' class SList(list):'
142 n = nlstr = property(get_nlstr)
122 n = nlstr = property(get_nlstr)
143
123
144 def get_paths(self):
124 def get_paths(self):
125 from path import path
145 try:
126 try:
146 return self.__paths
127 return self.__paths
147 except AttributeError:
128 except AttributeError:
@@ -268,7 +268,9 b' if sys.version_info < (3, 3):'
268 extras_require['notebook'].extend(extras_require['nbformat'])
268 extras_require['notebook'].extend(extras_require['nbformat'])
269 extras_require['nbconvert'].extend(extras_require['nbformat'])
269 extras_require['nbconvert'].extend(extras_require['nbformat'])
270
270
271 install_requires = []
271 install_requires = [
272 'path.py', # required by pickleshare, remove when pickleshare is added here
273 ]
272
274
273 # add readline
275 # add readline
274 if sys.platform == 'darwin':
276 if sys.platform == 'darwin':
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (1267 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now