23 lines
408 B
Python
23 lines
408 B
Python
from uuid import uuid4
|
|
|
|
nom_sonde = input("Choisir un nom pour la sonde:")
|
|
|
|
|
|
content = """
|
|
[probe]
|
|
identifiant_sonde = {id_sonde}
|
|
nom_sonde = {nom_sonde}
|
|
emails = {emails}
|
|
|
|
"""
|
|
|
|
|
|
with open(f"api_client_{nom_sonde}.ini", "w") as f:
|
|
f.write(
|
|
content.format(
|
|
id_sonde=str(uuid4()),
|
|
nom_sonde=nom_sonde,
|
|
emails="\n ".join(["aaa", "bbb"]),
|
|
)
|
|
)
|