How to use win32api package to send to printer a file in memory

ilCorvo fabiocorvinoe73779 at gmail.com
Thu Jun 8 04:18:40 EDT 2017


I have an Angular application that is communicating via websocket with a python app.
Actually, I save the file in Angular, then I pass to the websocket the file path and I print it by win32api.ShellExecute.

Anyway, I do not really need to save the file, so would be much better to send the content though the websocket and then then print it.

Can anyone send me some code snippet to show:
     1.	Which is the best data structure to receive the file content via websocket (bytes array?)
     2.	How to invoke win32api.ShellExecute, or equivalent function, to print the content.

Thank you 



More information about the Python-list mailing list