Re: Problem printing in Win98
Dale Strickland-Clark [EMAIL PROTECTED] wrote: I presume this .ps file is a preformed postscript file that should be sent to a postscript printer without further modification? In this case, I think you should use copy instead of print. Something like this: win32api.ShellExecute(0, copy, file.ps prn, None, ., 0) No, that's not how ShellExecute works. ShellExecute looks up the handler for the file in the third parameter, based on its extension, and then looks for the handler for the appropriate verb in the second parameter. It's just registry magic. It's not a command line thing. Most file types have an open verb and a print verb; some also have edit. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem printing in Win98
Maravilloso wrote: Hi I'm trying to automatically send a postscript file to be printed to the default printer in a Win98 PC, by means of using the instrucction: win32api.ShellExecute (0, print, file.ps, None, ., 0) but it raises an exception with the message: error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') Curiously, that instruction does works on Win2K/XP, but trying to use this shortcut for easy printing in Win98 provokes such error. I've tried in different machines (all of them running with Win98) and I obtain the same output. Does anybody knows what happens with Win98 printing automation? Any idea? Thanks in advance I presume this .ps file is a preformed postscript file that should be sent to a postscript printer without further modification? In this case, I think you should use copy instead of print. Something like this: win32api.ShellExecute(0, copy, file.ps prn, None, ., 0) It has been a long time since I used Windows, especially 98, but if 'prn' doesn't work, you might try one of: 'lpt', 'lpt1', 'lpt:', 'lpt1:'. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list
Problem printing in Win98
Hi I'm trying to automatically send a postscript file to be printed to the default printer in a Win98 PC, by means of using the instrucction: win32api.ShellExecute (0, print, file.ps, None, ., 0) but it raises an exception with the message: error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') Curiously, that instruction does works on Win2K/XP, but trying to use this shortcut for easy printing in Win98 provokes such error. I've tried in different machines (all of them running with Win98) and I obtain the same output. Does anybody knows what happens with Win98 printing automation? Any idea? Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem printing in Win98
According to MSDN, err code 31 from ShellExecute is SE_ERR_NOASSOC, meaning there's not an application registered for printing that file type. Roger Maravilloso [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I'm trying to automatically send a postscript file to be printed to the default printer in a Win98 PC, by means of using the instrucction: win32api.ShellExecute (0, print, file.ps, None, ., 0) but it raises an exception with the message: error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') Curiously, that instruction does works on Win2K/XP, but trying to use this shortcut for easy printing in Win98 provokes such error. I've tried in different machines (all of them running with Win98) and I obtain the same output. Does anybody knows what happens with Win98 printing automation? Any idea? Thanks in advance == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption = -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem printing in Win98
Maravilloso [EMAIL PROTECTED] wrote: I'm trying to automatically send a postscript file to be printed to the default printer in a Win98 PC, by means of using the instrucction: win32api.ShellExecute (0, print, file.ps, None, ., 0) but it raises an exception with the message: error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') Roger is correct. In order to print a .ps file, you have to have installed an application that handles .ps files. You have probably installed GhostScript on your 2K/XP box. If you install it on your Win98 box, your ShellExecute should work. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list