Hi,
I've tried to create a scad file directly with python in terminal from "scad_render_to_file()" function but failed because there is no source file to read.
I suggest add this function to directly append code with python in terminal running :
def scad_render_append_to_file( scad_object, file_header='', filepath=''):
if filepath =='':
filepath = os.path.abspath('.') + "/solid.scad"
f = open( filepath,"a")
f.write( scad_render(scad_object, file_header) )
f.close()
Tested and it's working.
Thanks