Can anyone teach me how to create a function which when called shuts down the computer, or opens an image or video and so on?

sravan953
Recommended Answers
Jump to PostJust a quick note. The above code will work if you change all of the instances of "sys" to "os"
SO it will look like
import os os.system("shutdown -s")
Hope that helps :)
All 3 Replies
Reply to this topic 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.