Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to initialize device PRN in Python

Tags:

python-3.x

I attempt to run a python program and the following pops up in command prompt:

"Unable to initialize device PRN"

I should also mention that the program runs fine.

like image 783
user2463417 Avatar asked Jun 07 '13 12:06

user2463417


People also ask

What is PRN in Python?

Short for PRiNter, PRN is the name MS-DOS assigns to the first parallel port. For example, MS-DOS may report the following error message: "Not Ready Writing Device PRN. ... if MS-DOS is unable to access or send information to the printer port.

How do I print from command prompt?

Print a file or files to a local or network printer. Syntax PRINT [/D:device] [pathname(s)] Key device Either a local printer (LPTx, COMx ) or a network printer by its sharename (\\servername\print_share) pathname The file or files to be printed. The default device is PRN.


1 Answers

I had this same problem when I accidentally typed "print program.py" instead of "python program.py". The error message comes from the Windows command-line program named print. Those who suggested restarting the command prompt probably committed the same typo without noticing, and corrected it in their new command prompt.

like image 97
omaha_brad Avatar answered Sep 20 '22 11:09

omaha_brad