Show More
@@ -26,7 +26,7 __all__ = ['display', 'display_pretty', 'display_html', 'display_markdown', | |||
|
26 | 26 | 'display_javascript', 'display_pdf', 'DisplayObject', 'TextDisplayObject', |
|
27 | 27 | 'Pretty', 'HTML', 'Markdown', 'Math', 'Latex', 'SVG', 'JSON', 'GeoJSON', 'Javascript', |
|
28 | 28 | 'Image', 'clear_output', 'set_matplotlib_formats', 'set_matplotlib_close', |
|
29 | 'publish_display_data', 'update_display', 'DisplayHandle'] | |
|
29 | 'publish_display_data', 'update_display', 'DisplayHandle', 'Video'] | |
|
30 | 30 | |
|
31 | 31 | #----------------------------------------------------------------------------- |
|
32 | 32 | # utility functions |
@@ -669,16 +669,16 class JSON(DisplayObject): | |||
|
669 | 669 | def _repr_json_(self): |
|
670 | 670 | return self._data_and_metadata() |
|
671 | 671 | |
|
672 | css_t = """$("head").append($("<link/>").attr({ | |
|
672 | _css_t = """$("head").append($("<link/>").attr({ | |
|
673 | 673 | rel: "stylesheet", |
|
674 | 674 | type: "text/css", |
|
675 | 675 | href: "%s" |
|
676 | 676 | })); |
|
677 | 677 | """ |
|
678 | 678 | |
|
679 | lib_t1 = """$.getScript("%s", function () { | |
|
679 | _lib_t1 = """$.getScript("%s", function () { | |
|
680 | 680 | """ |
|
681 | lib_t2 = """}); | |
|
681 | _lib_t2 = """}); | |
|
682 | 682 | """ |
|
683 | 683 | |
|
684 | 684 | class GeoJSON(JSON): |
@@ -802,11 +802,11 class Javascript(TextDisplayObject): | |||
|
802 | 802 | def _repr_javascript_(self): |
|
803 | 803 | r = '' |
|
804 | 804 | for c in self.css: |
|
805 | r += css_t % c | |
|
805 | r += _css_t % c | |
|
806 | 806 | for l in self.lib: |
|
807 | r += lib_t1 % l | |
|
807 | r += _lib_t1 % l | |
|
808 | 808 | r += self.data |
|
809 | r += lib_t2*len(self.lib) | |
|
809 | r += _lib_t2*len(self.lib) | |
|
810 | 810 | return r |
|
811 | 811 | |
|
812 | 812 | # constants for identifying png/jpeg data |
General Comments 0
You need to be logged in to leave comments.
Login now