MessageBox = prototype(('MessageBoxA', windll.user32), paramflags)
filename = 'readme.txt'
os.startfile(filename, 'edit')
try:
    os.startfile(filename, 'edit')
except WindowsError as e:
    MessageBox(text=str(e))
How do I open a file for edit from the command line under Windows?