NetEaseMusicApi icon indicating copy to clipboard operation
NetEaseMusicApi copied to clipboard

mac or linux bug

Open OSMeteor opened this issue 8 years ago • 2 comments

http://stackoverflow.com/questions/29823028/attributeerror-module-object-has-no-attribute-startfile

os' has no attribute 'startfile'

OSMeteor avatar May 11 '17 09:05 OSMeteor

import os, sys, subprocess

def open_file(filename): if sys.platform == "win32": os.startfile(filename) else: opener ="open" if sys.platform == "darwin" else "xdg-open" subprocess.call([opener, filename])

OSMeteor avatar May 11 '17 09:05 OSMeteor

http://stackoverflow.com/questions/17317219/is-there-an-platform-independent-equivalent-of-os-startfile/17317468#17317468

OSMeteor avatar May 11 '17 09:05 OSMeteor