Bonjour/Bonsoir
Je suis nouveau sur python et je voudrais créer un petit programme qui me permet de changer l’adresse mac de ma raspberry pi zero w.
J’ai déjà commencé mon code mais je bute sur ce problème lors de l’insertion de l’adresse mail sur la console.
Partie du code incriminé :
def change_mac_adress():
# Check current working directory.
retval = os.getcwd()
# Now change the directory for find bdaddr
os.chdir(locali_of_bdaddr)
# Check current working directory.
retval = os.getcwd()
time.sleep(1)
# All exe of command.
os.system(make)
time.sleep(1)
a, b, c, d, e, f = input(« Entrez la MAC address separated by space : »).split()
adress_mac = (a + ‹ : › + b + ‹ : › + c + ‹ : › + d + ‹ : › + e + ‹ : › + f)
print(adress_mac)
command_mac_adress = (« sudo ./bdaddr -i hci0 -r » + adress_mac)
print(command_mac_adress)
os.system(command_mac_adress)
time.sleep(1)
os.system(reset_hci_device)
time.sleep(1)
os.system(restart_bluetooth_service)
print(« Reboot terminer »)
time.sleep(1)
os.system(check)