Please can anybody help me with this problem, i am creating an application that outputs to a notepad file on windows 7, i would like to know if there is a python module that i can use to invoke a notepad file(example trial.txt) to output into.THanks

Recommended Answers

import webbrowser
Jump to Post

All 3 Replies

import webbrowser

Thanks alot but it opened my browser, if i may ask is there a way i can open notepad or microsoft word

something like:

import subprocess as sp
nameOfProgramToRun = "notepad.exe"
nameOfFileToOpen = "test.txt"
sp.Popen([nameOfProgramToRun, nameOfFileToOpen])

should do the trick.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.