f i opened a document in terminal through this

os.system("open " + pathName)

how should i close it? is there something like

os.system("exit")

or something


Thanks

Recommended Answers

All 2 Replies

You have to kill the process, and how you do that is dependent on the OS you are using. You should use subprocess instead (see os.kill() at Doug Hellmann's site).

Great help! Thanks :)

Be a part of the DaniWeb community

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