Open some files and immediately accept the invitation.

I am trying to build an application using pygtk. In the application, I download multiple files and open them with another application. Each time you open a file, you are prompted to confirm opening the file. My goal is to make the confirmation automatically from my application, so the user doesn't have to re-confirm every file. Is there a way to do this?

The initial part of my application:

if platform.system().lower().startswith('linux'):
        subprocess.call(["xdg-open", path])

elif platform.system().lower().startswith('windows'):
        os.startfile(path)

      

Thank you so much!

+3


source to share





All Articles