os.startfile暂时仅适用于Windows,但是xdg-
open将在运行X的任何UNIX客户端上可用。
if sys.platform == 'linux2': subprocess.call(["xdg-open", file])else: os.startfile(file)

os.startfile暂时仅适用于Windows,但是xdg-
open将在运行X的任何UNIX客户端上可用。
if sys.platform == 'linux2': subprocess.call(["xdg-open", file])else: os.startfile(file)