def _create_srt_file(content=None):
 content = (content or SRT_content)
 srt_file = tempfile.NamedTemporaryFile(suffix='.srt')
 srt_file.content_type = 'application/x-subrip; charset=utf-8'
 srt_file.write(content)
 srt_file.seek(0)
 return srt_file

def _create_srt_file ( content = None ) : content = ( content or SRT_content ) srt_file = tempfile . NamedTemporaryFile ( suffix = '.srt' ) srt_file . content_type = 'application/x-subrip; charset=utf-8' srt_file . write ( content ) srt_file . seek ( 0 ) return srt_file
create srt file in filesystem .