8000 python implementation added · ilovejs/python_reference@8ecab48 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ecab48

Browse files
committed
python implementation added
1 parent 4fe9ae0 commit 8ecab48

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

ipython_magic/watermark.ipynb

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:fca7570e5ddd2ad9995dcf8f622de267860c7dac6cb0b275efffc900a181ebd7"
4+
"signature": "sha256:b293f22eb716f74ec27869a5122812437e0a7f4743ddfe8c06a94c39f31c7d3e"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -81,6 +81,26 @@
8181
],
8282
"prompt_number": 1
8383
},
84+
{
85+
"cell_type": "code",
86+
"collapsed": false,
87+
"input": [
88+
"%install_ext ./watermark.py"
89+
],
90+
"language": "python",
91+
"metadata": {},
92+
"outputs": [
93+
{
94+
"output_type": "stream",
95+
"stream": "stdout",
96+
"text": [
97+
"Installed watermark.py. To use it, type:\n",
98+
" %load_ext watermark\n"
99+
]
100+
}
101+
],
102+
"prompt_number": 1
103+
},
84104
{
85105
"cell_type": "markdown",
86106
"metadata": {},
@@ -205,9 +225,10 @@
205225
"output_type": "stream",
206226
"stream": "stdout",
207227
"text": [
208-
"28/06/2014 14:08:08\n",
228+
"28/06/2014 15:29:14\n",
209229
"\n",
210230
"Python 3.4.1\n",
231+
"Python implementationCPython\n",
211232
"IPython 2.1.0\n",
212233
"\n",
213234
"compiler : GCC 4.2.1 (Apple Inc. build 5577)\n",

ipython_magic/watermark.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Sebastian Raschka 2014
33
44
watermark.py
5-
version 1.0.0
5+
version 1.0.1
66
77
88
IPython magic function to print date/time stamps and various system information.
@@ -50,7 +50,7 @@ class WaterMark(Magics):
5050
"""
5151
IPython magic function to print date/time stamps
5252
and various system information.
53-
53+
5454
"""
5555
@magic_arguments()
5656
@argument('-d', '--date', action='store_true', help='prints current date')
@@ -68,6 +68,8 @@ def watermark(self, line):
6868
IPython magic function to print date/time stamps
6969
and various system information.
7070
71+
watermark version 1.0.1
72+
7173
"""
7274
self.out = ''
7375
args = parse_argstring(self.watermark, line)
@@ -111,7 +113,8 @@ def _get_packages(self, pkgs):
111113
def _get_pyversions(self):
112114
if self.out:
113115
self.out += '\n\n'
114-
self.out += 'Python %s\nIPython %s' %(
116+
self.out += '%s %s\nIPython %s' %(
117+
platform.python_implementation(),
115118
platform.python_version(),
116119
IPython.__version__
117120
)
@@ -134,4 +137,4 @@ def _get_sysinfo(self):
134137

135138

136139
def load_ipython_extension(ipython):
137-
ipython.register_magics(WaterMark)
140+
ipython.register_magics(WaterMark)

0 commit comments

Comments
 (0)
0