例如:
python my.py > somefile.txt
有没有办法在Windows和Linux上发现somefile.txt的名称?
import os my_output_file = os.readlink('/proc/%d/fd/1' % os.getpid())