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

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

IF statement in MySQL trigger -

ASP.NET session vs session state and cookies vs cookie less -