A pure python implentation for communicating to Adobe Photoshop
Photoshop Connection is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with Photoshop Connection. More Information
There is a EventListener class to subscribe to events in Photoshop.
from pyps import Connection, EventListener conn = Connection() conn.connect(passwd='Swordfish') conn.send('alert("Hello");', True) print conn.send('$.version;', True) def callback(message, *args): print message.command print message.content def callback2(message, *args): print message.command print message.content print args listener = EventListener(conn) listener.start() listener.subscribe('foregroundColorChanged', callback) listener.subscribe('toolChanged', callback2, (True, 'xxx')) listener.subscribe('currentDocumentChanged', callback) ## -- We need to keep the EventListener alive while True: time.sleep(1.0)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
pyps-0.6.0.tar.gz (14.5 kB view hashes)