You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find that opening the Downloads folder in a webbrowser (as the current code
specifies) is kind of an odd way to do this. From my brief Googling I realize
there isn't a perfectly elegant way to use the file browser, but there are a
few ways that are not bad.
I've attached a diff for a quick way to implement the desired behavior. Since I
only run a Linux environment I haven't tested OSX or Windows, but my
web-sources tell me that this is the proper way to implement the code on those
platforms. I apologize that I cannot cite those sources, but I patched this on
my local machine months ago and am only now submitting my suggestion
Original issue reported on code.google.com by [email protected] on 15 Apr 2012 at 7:52
Think there's a slight bug in the patch in that is has 2 Mac options and no
Windows :)
I suggest instead:
if sys.platform == 'linux2':
subprocess.Popen(['xdg-open', settings.save_dir])
elif sys.platform == 'darwin':
subprocess.Popen(['open', settings.save_dir])
elif sys.platform == 'win32':
os.startfile(settings.save_dir)
else:
webbrowser.open(settings.save_dir)
Not sure about 64-bit Windows's ID.
Well, would you look at that. OK, looks like you've got it.
The Python documentation (http://docs.python.org/library/sys.html#sys.platform)
seems to suggest that the ID for windows is 'win32' regardless of the platform.
(Edit: damn wikisyntax)
Original issue reported on code.google.com by
[email protected]
on 15 Apr 2012 at 7:52Attachments:
The text was updated successfully, but these errors were encountered: