##// END OF EJS Templates
remove path from external
MinRK -
Show More
@@ -34,7 +34,6 b' License: MIT open source license.'
34 34 """
35 35 from __future__ import print_function
36 36
37 from IPython.external.path import path as Path
38 37 import stat, time
39 38 import collections
40 39 try:
@@ -43,6 +42,8 b' except ImportError:'
43 42 import pickle
44 43 import glob
45 44
45 from path import path as Path
46
46 47 def gethashfile(key):
47 48 return ("%02x" % abs(hash(key) % 256))[-2:]
48 49
@@ -8,42 +8,21 b' Inheritance diagram:'
8 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 11 import os
23 12 import re
24 13 import sys
25 14 import textwrap
26 15 from string import Formatter
27 16
28 from IPython.external.path import path
29 17 from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
30 18 from IPython.utils import py3compat
31 19
32 #-----------------------------------------------------------------------------
33 # Declarations
34 #-----------------------------------------------------------------------------
35
36 20 # datetime.strftime date format for ipython
37 21 if sys.platform == 'win32':
38 22 date_format = "%B %d, %Y"
39 23 else:
40 24 date_format = "%B %-d, %Y"
41 25
42
43 #-----------------------------------------------------------------------------
44 # Code
45 #-----------------------------------------------------------------------------
46
47 26 class LSString(str):
48 27 """String derivative with a special access attributes.
49 28
@@ -52,7 +31,7 b' class LSString(str):'
52 31 .l (or .list) : value as list (split on newlines).
53 32 .n (or .nlstr): original value (the string itself).
54 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 36 Any values which require transformations are computed only once and
58 37 cached.
@@ -84,6 +63,7 b' class LSString(str):'
84 63 n = nlstr = property(get_nlstr)
85 64
86 65 def get_paths(self):
66 from path import path
87 67 try:
88 68 return self.__paths
89 69 except AttributeError:
@@ -113,7 +93,7 b' class SList(list):'
113 93 * .l (or .list) : value as list (the list itself).
114 94 * .n (or .nlstr): value as a string, joined on newlines.
115 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 98 Any values which require transformations are computed only once and
119 99 cached."""
@@ -142,6 +122,7 b' class SList(list):'
142 122 n = nlstr = property(get_nlstr)
143 123
144 124 def get_paths(self):
125 from path import path
145 126 try:
146 127 return self.__paths
147 128 except AttributeError:
@@ -268,7 +268,9 b' if sys.version_info < (3, 3):'
268 268 extras_require['notebook'].extend(extras_require['nbformat'])
269 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 275 # add readline
274 276 if sys.platform == 'darwin':
1 NO CONTENT: file was removed
1 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