[Pythonmac-SIG] Photoshop events from Python

anand.vasudevan at wipro.com anand.vasudevan at wipro.com
Mon Apr 17 12:44:55 CEST 2006


Hi,



Our application which runs on Mac OS X, uses the API Suite generated by
GenSuiteModule (provided by python) to communicate to Photoshop CS.

Most of the input parameters that would be generally specified by the
user such as rasterization options etc. are passed through the API
generated by GenSuiteModule and the dialog display is also turned off.



The API works fine in most of the cases but throws this exception when
there are additional dialogs shown by Photoshop CS like when the file is
corrupt or some fonts used in the document are not available: -



TypeError: unpack non-sequence



Following is the code-snippet from the application: -



import Photoshop2 as ps



ref = File.FSRef(path)

alias = ref.FSNewAliasMinimal()

open_opts = (EPS_open_options,   resolution=300,   use_antialias=True)

ps.send_timeout = 5 * 60

ps.open(*[alias], **open_opts)



After the 5 second timeout period, it throws an exception, when
Photoshop displays a diaolog box with message such as "The parser module
could not parse the file" or "The file was modified by another user.
Continue anyway? <Continue> and <Cancel> buttons".



Has anyone faced this problem before? Is there a mechanism to respond to
the dialogs shown by Photoshop, by way of sending events to press
Continue or Cancel buttons or send the error message back to Python
application from Photoshop?



Regards

Anand






The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060417/5bc78abc/attachment.htm 


More information about the Pythonmac-SIG mailing list