.\" Text automatically generated by txt2man .TH py 1 "24 May 2022" "" "" .SH NAME \fBpythonpy \fP- 'python \fB-c\fP', with tab completion and shorthand \fB .SH SYNOPSIS .nf .fam C \fBpy\fP [\fB-x\fP] [\fB-l\fP] [\fB-c\fP \fIPRE_CMD\fP] [\fB-C\fP \fIPOST_CMD\fP] [\fB-V\fP] [\fB-h\fP] [\fIexpression\fP] .fam T .fi .fam T .fi .SH DESCRIPTION pythonpy will evaluate any Python \fIexpression\fP from the command line. .PP 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. .SH OPTIONS .TP .B \fB-x\fP Treat each row of stdin as x .TP .B \fB-l\fP Treat list of stdin as l .TP .B \fB-c\fP \fIPRE_CMD\fP Run code before \fIexpression\fP .TP .B \fB-C\fP \fIPOST_CMD\fP Run code after \fIexpression\fP .TP .B \fB-V\fP, \fB--version\fP Version info .TP .B \fB-h\fP, \fB--help\fP Show help message and exit .SH EXAMPLES Float arithmetic: .PP .nf .fam C $ py '3 * 1.5' .fam T .fi Import any module automatically: .PP .nf .fam C $ py 'math.exp(1)' .fam T .fi Multiply each line of input by 7: .PP .nf .fam C $ py 'range(3)' | py -x 'int(x)*7' .fam T .fi Remove every file returned by the find command: .PP .nf .fam C $ find . -type f | py -x '"rm %s" % x' | sh .fam T .fi .SH SEE ALSO \fBpython\fP(1) .SH BUGS Bugs should be reported as issues at the project's GitHub page: .SH AUTHOR pythonpy is developed by Russell Stewart . .PP This man page was written by Tiago Ilieve for the Debian distribution (but it may be used by others).