import os
with open('/storage/.kodi/addons/script.moonlight/start_moonlight.tmp', 'w') as f:
f.write("open moonlight")