Worked quite well actually. I asked it to write a python file then save it. it did. Turns out giving it a specific name for the file also works and steers it even more strongly towards saving the file. Also gave it specific names for the functions it should write and that worked as well.