Python Forum

Full Version: is it possible to use python to read and write from a jsx file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have extend script java script document i want to write into using python. but it didnt work. does it only work with txt files?
Quote:but it didnt work.
How so? Please define didn't work!
What were you expecting it to do, what does your code look like?
see: https://www.lifewire.com/jsx-file-2621849
read file. write into file. looked something like this:

with open('C:/Users/mr big/Desktop/xxx1.jsx', 'r') as f2:
text = "xxx"
with open('C:/Users/mr big/Desktop/xxx1.jsx', 'w') as fout:
fout.write(text)
Can you upload a small jsx-file?