⚲
Projet
Général
Profil
Connexion
S'enregistrer
Accueil
Projets
Aide
Recherche
:
Polytech Ge Sous Traitance
Tous les projets
Polytech Projets Ge
»
Polytech Ge Sous Traitance
Aperçu
Activité
Roadmap
Demandes
Gantt
Calendrier
Annonces
Documents
Wiki
Fichiers
Dépôt
Télécharger (559 octets)
Support #12754
» qrwifi.py
Anonyme, 10/11/2021 14:53
import
pyqrcode
as
pq
ssid
=
'fredkan'
security
=
'WPA'
password
=
'polytechge'
qr
=
pq
.
create
(
f
'WIFI:S:
{
ssid
}
;T:
{
security
}
;P:
{
password
}
;;'
)
print
(
qr
.
terminal
())
qr
.
png
(
'wifi.png'
)
def
create_wifi_qr
(
ssid
:
str
,
security
:
str
,
password
:
str
):
qr
=
pq
.
create
(
f
'WIFI:S:
{
ssid
}
;T:
{
security
}
;P:
{
password
}
;;'
)
return
qr
qr
=
create_wifi_qr
(
ssid
,
security
,
password
)
print
(
qr
.
text
())
def
qr2array
(
qr
):
arr
=
[]
for
line
in
qr
.
text
().
split
(
'
\n
'
):
if
len
(
line
)
!=
0
:
arr
.
append
([
int
(
bit
)
for
bit
in
line
])
return
np
.
vstack
(
arr
)
« Précédent
1
2
3
4
5
Suivant »
(4-4/5)
Chargement...