Hallo Zusammen,
Ich bin absoluter Neuling was Python angeht und schon ein Problem damit...
Ich verwende Python 2.5 und muss auch dabei bleiben. Leider funktioniert folgendes nicht:
command = "set freq {0!s}" .format(self.frequency / 1000000.0)
denn wie ich bereits weiss, gibt es die Format Methode erst seit Python 2.6
Wie muss ich den code umschreiben, damit er unter Python 2.5 funktioniert?
Vielen Dank im Vorraus.
DL4DZ
Probleme mit Format Methode
-
- Python-Forum Veteran
- Beiträge: 16025
- Registriert: Freitag 20. Juni 2003, 16:30
- Kontaktdaten:
Ungetestet:
Code: Alles auswählen
command = "set freq %s" % (self.frequency / 1000000.0)
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice