Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Fungsi Reboot dan Shutdown pada Python

Fungsi Reboot dan Shutdown pada Python

def reboot(self):
import subprocess
subprocess.call([“sudo”,”reboot”,”-p”])

def shutdown(self):
import subprocess
subprocess.call([“sudo”,”halt”,”-p”])

Filed under: 7. Operating System

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>