March 7th, 2013, 07:30 PM
Subprocess Print file
From the interactive window: PyWin 2.7.3
I sucessfully print the file All3Rpts.txt to the line printer using the following syntax:
>>> from subprocess import *
>>> file = "C:\\Users\\Jake Sadlak\\Documents\\StockBee\\dailyStocks\\FileIO\\All3Rpts.txt"
>>> check_output("start /min notepad /P" + file, shell=True)
I then copy/paste this to a python program and run. The print does not occur.
I then go back to the interactive woindow and run the above code and now the print doesn't occur. There's no error printed.
I look at the All3Rpts.txt file in wordPad and the file has 0 bytes, the file is empty.
I'm looking for advice on how to resolve this issue.
March 7th, 2013, 10:12 PM
Put a space between the P and the "
When you cut and paste did you include the prompt?
[/code] are essential for python code and Makefiles!