File: py.txt

package info (click to toggle)
pythonpy 0.4.11b-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208 kB
  • sloc: python: 465; sh: 19; makefile: 18
file content (49 lines) | stat: -rw-r--r-- 1,267 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
NAME
  pythonpy - 'python -c', with tab completion and shorthand

SYNOPSIS
  py [-x] [-l] [-c PRE_CMD] [-C POST_CMD] [-V] [-h] [expression]

DESCRIPTION
  pythonpy will evaluate any Python expression from the command line.

  This will be done by the same Python interpreter that runs it. As this
  version uses Python 3, it is compatible with Python 3 syntax only.

OPTIONS
  -x             Treat each row of stdin as x
  -l             Treat list of stdin as l
  -c PRE_CMD     Run code before expression
  -C POST_CMD    Run code after expression
  -V, --version  Version info
  -h, --help     Show help message and exit

EXAMPLES
  Float arithmetic:

    $ py '3 * 1.5'

  Import any module automatically:

    $ py 'math.exp(1)'

  Multiply each line of input by 7:

    $ py 'range(3)' | py -x 'int(x)*7'

  Remove every file returned by the find command:

    $ find . -type f | py -x '"rm %s" % x' | sh

SEE ALSO
  python(1)

BUGS
  Bugs should be reported as issues at the project's GitHub page:
  <https://github.com/Russell91/pythonpy/issues>

AUTHOR
  pythonpy is developed by Russell Stewart <russell.s.stewart@gmail.com>.

  This man page was written by Tiago Ilieve <tiago.myhro@gmail.com> for the
  Debian distribution (but it may be used by others).