How to open a file in python 3 -


i want open it not read it.
tried this:

x = open("filename", "r") abc = x.read() x.close() 

the above code read file, did not open file.
file "bat" file

open creates stream of data associated file. not initiate file viewing software.

os.startfile('path/to/file.ext') # opens file in respective program 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -