Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Photoshop - Python Integration

Community Beginner ,
Apr 21, 2023 Apr 21, 2023

Hello everyone!

 

I was wondering if I can write Python code to open a PSD file in Photoshop, import Variable Data Sets from a TXT file, then export Data Sets as Files to a specified path.

I have everything ready in place, the Data Sets are defined in the PSD file, and the TXT file is formatted as it should be, I just want the Python code to initiate the process.

 

Any help?

Thank you in advance.

TOPICS
Actions and scripting , Windows
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Contributor ,
Apr 21, 2023 Apr 21, 2023

Do have a look here and see if you're happy.

https://github.com/loonghao/photoshop-python-api

 

If so, could you mark this as a correct answer for posterity? Thx!

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 21, 2023 Apr 21, 2023
LATEST

To open a Photoshop PSD file using Python, you can use the psd-tools library. Here is an example code snippet:

from psd_tools import PSDImage

psd = PSDImage.open('path/to/file.psd')

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines