Last active
July 15, 2018 21:56
-
-
Save leotada/75295ed7e8bfccd2619e to your computer and use it in GitHub Desktop.
Python open CD driver on Windows - Abrir drive CD no Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exemplo pra abrir e fechar porta do driver de CD no windows. Python2: | |
from ctypes import * | |
import time | |
print("opening....") | |
windll.winmm.mciSendStringA("set cdaudio door open", None, 0, 0) | |
time.sleep(5) | |
print("closing...") | |
windll.winmm.mciSendStringA("set cdaudio door closed", None, 0, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment