Copy link to clipboard
Copied
Dear Legends,
We have few clarifications regarding Python language in InDesign Automation.
1. Can we use Python instead of InDesign JavaScripting in InDesign?
2. If 1st point is yes, then how to install Python 3.5 version?
3. Instead of Extend script ToolKit, what we use (Pycharm etc..)?
4. For location we can place in Script Panel or any others?
5. Any InDesign Python tutorials same like as InDesign Scripting Tutorials?
Anyone please help for my request.
Thanks in Advance
Siraj
Copy link to clipboard
Copied
Siraj--
There's no official way to use Python with InDesign, but a little googling turns up things like
https://indesignsecrets.com/creating-indesign-scripts-with-python.php
I hope this is helpful.
Copy link to clipboard
Copied
1. Yes, as indeed Google should have shown. InDesign's scripting interface is open enough to be used with any external language that supports the required COM interface.
2. Various Python sites will tell you that for your platform. The official site should suffice.
3. You can use the ExtendScript Toolkit Editor. It will not syntax-check and such (because it's an ExtendScript editor), and obviously you cannot run your Python code. But you can write Python with all plain text editors.
4. Not in the Script panel, and not anywhere else. You cannot "run" a Python script from within InDesign, as it does not support it. You could (theoretically, I didn't try) run a Javascript, VBS, or AppleScript that in turn runs your Python code.
5. No.
I suggested proper Python support in the InDesign Uservoice forum a while ago, nothing new on that front. Perhaps you should vote for it: Add Python to the list of supported scripting languages – Adobe InDesign Feedback
Copy link to clipboard
Copied
What is the advantages and disadvantages if we go for Python languages in InDesign?
Copy link to clipboard
Copied
priyak7746321 wrote
What is the advantages and disadvantages if we go for Python languages in InDesign?
The most obvious disadvantage: Python is not natively supported in InDesign.
There are few immediate advantages: "Python is cross-platform, it's easy to learn, and it is powerful" – the latter in the sense of 'having powerful commands', not in the sense of execution speed or something like that. Due to its semi-compiled nature Python may be a smidge faster, but do remember that most of the interactions on an InDesign document will take place inside InDesign, and that will neither run faster nor slower.
"InDesign's DOM can be naturally translated to Python": both have an equivalent (if not straight out equal) system of classes, properties, and methods.
"Python has a vast set of functional libraries": if you need data preprocessed going beyond what InDesign provides, Python can handle that part. It's probably also possible in JavaScript but Python just has vastly more ready-made libraries, due to its popularity in hard science environments.
There is no intrinsic advantage of Python over the currently (properly) supported languages, other than if you already know Python, it will be easier to write a script in that; if you don't know it but you *do* know JavaScript, use JavaScript. (And if you don't know either of these two, better stick to the one that *is* natively supported.)
All of these advantages are, alas, dwarfed by the fact that Python is not natively supported by InDesign.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now