mirror of
https://github.com/rasbt/python_reference.git
synced 2024-11-23 20:11:13 +00:00
python implementation added
This commit is contained in:
parent
4fe9ae0c15
commit
8ecab48e20
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:fca7570e5ddd2ad9995dcf8f622de267860c7dac6cb0b275efffc900a181ebd7"
|
||||
"signature": "sha256:b293f22eb716f74ec27869a5122812437e0a7f4743ddfe8c06a94c39f31c7d3e"
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
|
@ -81,6 +81,26 @@
|
|||
],
|
||||
"prompt_number": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"%install_ext ./watermark.py"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"Installed watermark.py. To use it, type:\n",
|
||||
" %load_ext watermark\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
@ -205,9 +225,10 @@
|
|||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"28/06/2014 14:08:08\n",
|
||||
"28/06/2014 15:29:14\n",
|
||||
"\n",
|
||||
"Python 3.4.1\n",
|
||||
"Python implementationCPython\n",
|
||||
"IPython 2.1.0\n",
|
||||
"\n",
|
||||
"compiler : GCC 4.2.1 (Apple Inc. build 5577)\n",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Sebastian Raschka 2014
|
||||
|
||||
watermark.py
|
||||
version 1.0.0
|
||||
version 1.0.1
|
||||
|
||||
|
||||
IPython magic function to print date/time stamps and various system information.
|
||||
|
@ -50,7 +50,7 @@ class WaterMark(Magics):
|
|||
"""
|
||||
IPython magic function to print date/time stamps
|
||||
and various system information.
|
||||
|
||||
|
||||
"""
|
||||
@magic_arguments()
|
||||
@argument('-d', '--date', action='store_true', help='prints current date')
|
||||
|
@ -68,6 +68,8 @@ class WaterMark(Magics):
|
|||
IPython magic function to print date/time stamps
|
||||
and various system information.
|
||||
|
||||
watermark version 1.0.1
|
||||
|
||||
"""
|
||||
self.out = ''
|
||||
args = parse_argstring(self.watermark, line)
|
||||
|
@ -111,7 +113,8 @@ class WaterMark(Magics):
|
|||
def _get_pyversions(self):
|
||||
if self.out:
|
||||
self.out += '\n\n'
|
||||
self.out += 'Python %s\nIPython %s' %(
|
||||
self.out += '%s %s\nIPython %s' %(
|
||||
platform.python_implementation(),
|
||||
platform.python_version(),
|
||||
IPython.__version__
|
||||
)
|
||||
|
@ -134,4 +137,4 @@ class WaterMark(Magics):
|
|||
|
||||
|
||||
def load_ipython_extension(ipython):
|
||||
ipython.register_magics(WaterMark)
|
||||
ipython.register_magics(WaterMark)
|
||||
|
|
Loading…
Reference in New Issue
Block a user