Skip to content

Commit 3403a99

Browse files
committed
README installation and example usage
1 parent a833121 commit 3403a99

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
11
# ipython-autotime
22
Time everything in IPython
3+
4+
## Installation:
5+
6+
```
7+
%install_ext https://raw.github.com/cpcloud/ipython-autotime/master/autotime.py
8+
```
9+
10+
## Examples
11+
12+
```python
13+
In [1]: %install_ext https://raw.github.com/cpcloud/ipython-autotime/master/autotime.py
14+
Installed autotime.py. To use it, type:
15+
%load_ext autotime
16+
17+
In [2]: %load_ext autotime
18+
time: 1433692.87 s
19+
20+
In [3]: x = 1
21+
time: 730.99 us
22+
23+
In [4]: x + 2
24+
Out[4]: 3
25+
time: 2.50 ms
26+
27+
In [5]: x + ''
28+
---------------------------------------------------------------------------
29+
TypeError Traceback (most recent call last)
30+
<ipython-input-5-bde712cacec5> in <module>()
31+
----> 1 x + ''
32+
33+
TypeError: unsupported operand type(s) for +: 'int' and 'str'
34+
time: 156.05 ms
35+
```

0 commit comments

Comments
 (0)