I entered it in the shell, being too lazy to write a separate script file. The response is the same:
<code> Traceback (most recent call last): File "<string>", line 1, in <fragment> pywintypes.error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') </code> So it's apparently an issue with my system, rather than the script. I've tried changing print processors and updating drivers, but to no avail. So I'm thinking this is not a Python problem, but a Windows problem, which means I dig elsewhere for the gem that fixes the problem. Thanks again. 73 de N5ILN/6 Alan On 5/6/2012 10:20 AM, Tim Golden wrote: > On 06/05/2012 18:07, Alan Jump wrote: >> Much obliged to both you and Vernon. I'm going to be adding quite a few >> code snippets to these emails, just to let the various search engines >> work their magic in case anyone besides me is running into the same >> problem. >> >> I tried a couple of the extended commands on the web page, and still got >> the same exception message. > > At the risk of asking you to do the obvious, what happens > if you do this: > > <code> > import win32api > > open ("test.txt", "w").write ("TESTING") > win32api.ShellExecute (0, "print", "test.txt", None, ".", 0) > > </code> > > In other words, is there a problem sending *anything* > to print via a Shell Execute? Or is there something > specific to your app? > > TJG > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32