[QUOTE=TheMaxx;23583]ah, i see how you’re doing it. I would keep all my business logic and functions in a file you distribute, then just make temp files from python that call into those functions with your values:
Distribute this with your other tools
As for getting back the value, i’m not sure where you would look, i doubt the stdout would have it. This approach would probably be a one way road. If you arent going back and forth between python and PS, then dont worry about json just yet.
My pslib does include the require function that lets you write and load modules according to the current js standards. Its similar to a python import.
Let me know if any of that makes sense[/QUOTE]
Well I can’t say that code didn’t confuse me. I had to look up self invoking anonymous function expressions on google.
I’ve spoken to some other people regarding this and every single one of them - including you - suggest writing the jsx-file to the disc on the fly and then executing it.
So afaik it appears that you have to do just that (write a file) or modify an already existing jsx file by opening it in python, find the variable and edit it with string substitution - like this:
with open(script_input_not_edited_yet) as o:
with open(script_path_after_edit, "w") as w:
Maybe it’s better to just start looking into JSON…
Do you know of any blogs or have any example code on that matter? (tossing JSON objects in between these apps)