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
python linux windows file


source to share


No one has answered this question yet

Check out similar questions:

5116
How can I check if a file exists without exceptions?
4829
How do I include a JavaScript file in another JavaScript file?
4800
How do I find all files containing specific text in Linux?
3474
How to list all files in a directory?
2112
How do I copy a file in Python?
2035
Catching multiple exceptions on one line (except block)
2028
How to read a file line by line in a list?
1773
How to symbolize a file in Linux?
1414
How do you add a file in Python?
1324
How do I prompt for Yes / No / Cancel input in a Linux shell script?



All Articles
Loading...
X
Show
Funny
Dev
Pics