Is there anything in python that can replicate freopen () functions in C or C ++? To be precise, I want to reproduce the functionality:
freopen("input.txt","r",stdin);
and
freopen("output.txt","w",stdout);
And then use the same (standard) functions for console I / O for file I / O. Any ideas?
c ++ c python file file-io
Quixotic
source share