##// END OF EJS Templates
renamed classes as recommended by @takluyver
Greg Caporaso -
Show More
@@ -37,19 +37,19 b' class YouTubeVideo(object):'
37 ></iframe>
37 ></iframe>
38 """%(self.width, self.height, self.id)
38 """%(self.width, self.height, self.id)
39
39
40 class LocalFile(object):
40 class FileLink(object):
41 """Class for embedding a local file link in an IPython session, based on path
41 """Class for embedding a local file link in an IPython session, based on path
42
42
43 e.g. to embed a link that was generated in the IPython notebook as my/data.txt
43 e.g. to embed a link that was generated in the IPython notebook as my/data.txt
44
44
45 you would do:
45 you would do:
46
46
47 local_file = LocalFile("my/data.txt")
47 local_file = FileLink("my/data.txt")
48 display(local_file)
48 display(local_file)
49
49
50 or in the HTML notebook, just
50 or in the HTML notebook, just
51
51
52 LocalFile("my/data.txt")
52 FileLink("my/data.txt")
53 """
53 """
54
54
55 def __init__(self,
55 def __init__(self,
@@ -93,21 +93,21 b' class LocalFile(object):'
93 # Right now this is the same as a formatting for a single file, but
93 # Right now this is the same as a formatting for a single file, but
94 # we'll encorage users to reference these with a different class in
94 # we'll encorage users to reference these with a different class in
95 # case we want to change this in the future.
95 # case we want to change this in the future.
96 LocalDirectory = LocalFile
96 DirectoryLink = FileLink
97
97
98 class LocalFiles(LocalFile):
98 class FileLinks(FileLink):
99 """Class for embedding local file links in an IPython session, based on path
99 """Class for embedding local file links in an IPython session, based on path
100
100
101 e.g. to embed links to files that were generated in the IPython notebook under my/data
101 e.g. to embed links to files that were generated in the IPython notebook under my/data
102
102
103 you would do:
103 you would do:
104
104
105 local_files = LocalFiles("my/data")
105 local_files = FileLinks("my/data")
106 display(local_files)
106 display(local_files)
107
107
108 or in the HTML notebook, just
108 or in the HTML notebook, just
109
109
110 LocalFiles("my/data")
110 FileLinks("my/data")
111
111
112 """
112 """
113 def __init__(self,
113 def __init__(self,
@@ -120,11 +120,11 b' class LocalFiles(LocalFile):'
120 included_suffixes : list of filename suffixes to include when
120 included_suffixes : list of filename suffixes to include when
121 formatting output [default: include all files]
121 formatting output [default: include all files]
122
122
123 See the LocalFile (baseclass of LocalDirectory) docstring for
123 See the FileLink (baseclass of LocalDirectory) docstring for
124 information on additional parameters.
124 information on additional parameters.
125 """
125 """
126 self._included_suffixes = _included_suffixes
126 self._included_suffixes = _included_suffixes
127 LocalFile.__init__(self,
127 FileLink.__init__(self,
128 path,
128 path,
129 _directory_prefix,
129 _directory_prefix,
130 _result_html_prefix,
130 _result_html_prefix,
General Comments 0
You need to be logged in to leave comments. Login now