Q:

How to print text file to PDF file in Linux command line

I have some Python source file that I would like to print to PDF for later reading
I used to do this with gedit, file by file
but there are a large number of .py file I would like to automate this process
How can I do this ? 
Better with Syntax highlighting too, such as with gedit
Thanks in advance

A:

use this single command 
$pandoc -o output.pdf input.py

