Created
November 30, 2015 19:34
-
-
Save zed/b987a6b66b8316b88830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": { | |
"collapsed": false, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "from time import*\nwhile[sleep(1)]:print(ctime())", | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"text": "Mon Nov 30 22:26:42 2015\nMon Nov 30 22:26:43 2015\nMon Nov 30 22:26:44 2015\nMon Nov 30 22:26:45 2015\nMon Nov 30 22:26:46 2015\nMon Nov 30 22:26:47 2015\nMon Nov 30 22:26:48 2015\nMon Nov 30 22:26:49 2015\n", | |
"output_type": "stream", | |
"name": "stdout" | |
}, | |
{ | |
"evalue": "", | |
"traceback": [ | |
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", | |
"\u001b[1;32m<ipython-input-2-9b77255ffe69>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mtime\u001b[0m \u001b[1;32mimport\u001b[0m\u001b[1;33m*\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mwhile\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mctime\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[1;31mKeyboardInterrupt\u001b[0m: " | |
], | |
"output_type": "error", | |
"ename": "KeyboardInterrupt" | |
} | |
] | |
} | |
], | |
"metadata": { | |
"language_info": { | |
"mimetype": "text/x-python", | |
"name": "python", | |
"version": "3.4.3+", | |
"nbconvert_exporter": "python", | |
"codemirror_mode": { | |
"version": 3, | |
"name": "ipython" | |
}, | |
"file_extension": ".py", | |
"pygments_lexer": "ipython3" | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3", | |
"language": "python" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment