Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Extensions - Use Javascript to do stuff in Python

$
0
0

Hi,

 

So I know where I want to go, but I'm missing one piece.

 

I'm creating an extension for AI and it's going great. The Javascript portion is done, and it exports out the files needed, but I have Python code that I wrote that I want to run. The Extension is going to be shipped to people, therefore the Python code needs to be inside of the extension so it can know where it's at. I want to place it beside of the javascript, so it's not going to need to go through any directories to find it.

In Python, I could do this with my eyes closed. In Javascript, I'm very much new.

 

I want to do this by running a shell script(or Applescript) that is run inside of the Javascript that will be able to find the current path of the running script(the javascript) and append the Python filename to it so it knows which one to use.

What I need:
I don't know how to do relative paths in Javascript and everything I find online is about web browser stuff.
I don't know how to correctly shell out from inside of the Javascript for Illustrator, I can't seem to get that to work.

 

Thanks!

 

Edit: Let me also state that we're on CC, not CC2014 so I can't use any of the node.js stuff that was implemented in CC2014.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>