I need to open PDF file with my python application, and I'm using os.startfile(filename.pdf) command, I would need open command act 100% like clicking the file in the windows explorer
python documentation about os.startfile: "Start a file with its associated application. This acts like double-clicking the file in Windows Explorer, or giving the file name as an argument to the start command from the interactive command shell: the file is opened with whatever application (if any) its extension is associated."
well this isn't true! what happens when you doubleclick file with unknown file extension in Windows Explorer? popup appears saying that the file extension is unknown! and this isn't happening when using os.startfile()
does anyone have solution for this?
os.startfile() returns error "1155", No application is associated with the specified file for this operation
so should I check for this error message and then manually start that unknown file extension popup "application" ? not really a python question but does anyone know how to start that popup externally? =)