You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo pip install pythonpy
# restart your shell for tab completion to take effect
py 'expression' ≅ python -c 'print(expression)'
Float Arithmetic
$ py '3 * 1.5'
4.5
Access imports directly
$ py 'math.exp(1)'
2.71828182846
$ py 'random.random()'
0.103173957713
$ py 'datetime.datetime.now?'
Help on built-in function now:
now(...)
[tz] -> new datetime with tz's local day and time.
Lists are printed row by row
$ py 'range(3)'
0
1
2
$ py '[range(3)]'
[0, 1, 2]
py -x 'foo(x)' will apply foo to each line of input