Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def open_command(arg):
return 'cmd /c start ' + arg
try:
from pathlib import Path
except ImportError:
from pathlib2 import Path
def _expanduser(self):
return self.__class__(os.path.expanduser(str(self)))
# pathlib's expanduser fails on windows, see http://bugs.python.org/issue19776
Path.expanduser = _expanduser
return 'xdg-open ' + arg
return 'open ' + arg
try:
from pathlib import Path
except ImportError:
from pathlib2 import Path
def _expanduser(self):
return self.__class__(os.path.expanduser(str(self)))
if not hasattr(Path, 'expanduser'):
Path.expanduser = _expanduser