I have a list containing many tuples,and stored in streaming_cfg
and tried to dump to a text file DEBUG_STREAMING_CFG_FILE
however it is an empty file contains nothing. why ?
debug_file = open(DEBUG_STREAMING_CFG_FILE,'w')
for lst in streaming_cfg:
print(lst)
debug_file.write(' '.join(str(s) for s in lst) + '\n')
debug_file.close
streaming_cfg
[('0', '0', 'h264', '1/4', '1280x1024', '10', 'vbr', '27', '8m'),
('0', '0', 'h264', '1/4', '1280x1024', '10', 'cbr', '6m', 'framerate'),
('0', '0', 'h264', '1/4', '1280x1024', '10', 'cbr', '6m', 'imagequality'),
('0', '0', 'h264', '1/4', '1280x1024', '10', 'cbr', '8m', 'framerate'),
('0', '0', 'h264', '1/4', '1280x1024', '10', 'cbr', '8m', 'imagequality'),
('0', '0', 'h264', '1/4', '2560x1920', '8', 'vbr', '27', '8m'),
('0', '0', 'h264', '1/4', '2560x1920', '8', 'cbr', '6m', 'framerate'),
('0', '0', 'h264', '1/4', '2560x1920', '8', 'cbr', '6m', 'imagequality'),
('0', '0', 'h264', '1/4', '2560x1920', '8', 'cbr', '8m', 'framerate'),
('0', '0', 'h264', '1/4', '2560x1920', '8', 'cbr', '8m', 'imagequality'),
('0', '0', 'mjpeg', '1/2', '1280x1024', '10', 'vbr', '25', '4m'),
('0', '0', 'mjpeg', '1/2', '1280x1024', '10', 'cbr', '6m', 'imagequality'),
('0', '0', 'mpeg4', '1/2', '1280x1024', '10', 'vbr', '28', '6m'),
('0', '0', 'mpeg4', '1/2', '1280x1024', '10', 'cbr', '3m', 'imagequality')]