This commit is contained in:
Kovid Goyal 2008-03-01 19:20:40 +00:00
parent e54893d9a8
commit 3c7f0c2ffa

View File

@ -266,6 +266,7 @@ def detect_ncpus():
#return the default value #return the default value
return 1 return 1
def launch(path_or_url): def launch(path_or_url):
if islinux: if islinux:
subprocess.Popen(('xdg-open', path_or_url)) subprocess.Popen(('xdg-open', path_or_url))
@ -273,4 +274,4 @@ def launch(path_or_url):
subprocess.Popen(('open', path_or_url)) subprocess.Popen(('open', path_or_url))
elif iswindows: elif iswindows:
import win32api import win32api
win32api.ShellExecute(0, 'open', path_or_url, None, os.getcwd(), 0) win32api.ShellExecute(0, 'open', path_or_url, None, os.getcwd(), 1)