How to: Python to PDF
Python is a high level programming language that uses the paradigms of object orientation, imperative and functional programming. Python was developed by Guido van Rossum in 1991 and was influenced by programming languages such as C and C++. A PDF file is a ubiquitous document format typically used for creating document types such as electronic books and brochures. Python source code files ".py files" can be converted into PDF files by using a free PDF printer.
Instructions
-
-
1
Download a free PDF printer such as Bullzip, CutePDF or DoPDF (see Resources). Install the software on your computer. Set the PDF printer as the "default" printer.
-
2
Go to the directory location in which the Python file exists. Right-click on the Python file, click on "Edit with IDLE," after which the file will be opened in the Python IDLE. The source code in the Python file should be present.
-
-
3
Press "Ctrl" and "P" on your keyboard, after which a "Print" dialog box will appear asking you to confirm if you want to print to the default printer. Click on "OK" to confirm you want to print to the default printer. The PDF printer file save dialog box will appear.
-
4
Change the file save location to the Windows Desktop, name the file and then click on "Save." The file should appear on your Windows Desktop.
-
5
Go to the Windows Desktop, then double-click on the PDF file to confirm that the Python code has printed correctly. The file should automatically open with Adobe Acrobat Reader.
-
1