
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hallo Daniela, ~ was hältst Du von folgender Lösung: import string input=open('file','r') S=input.readlines() for i in S: ~ ss=string.splitfields(i[:-1],",") ~ for j in ss: ~ print string.atof(j) Gruß Gerhard |>Hallo! |> |>Kennt jemand eine einfache Art um Koordinaten aus einem ASCII file als |>Zahlen und nicht als String in eine Liste einzulesen? |>Mein ASCII file hat folgende Form: |> |>47408983,9620543,441.357422 |>47408983,9620543,441.443348 |>usw. |> |>Wenn ich nun input=open('file','r') und dann S=input.readlines() ausführe, |>erhalte ich eine Liste mit Strings und nicht Zahlen. |>Danke für jegliche Tipps. |> |>Mfg Daniela - -- - ------------------------------------------------------ skequell ------ ~ Gerhard Quell Software & Knowledge Engineering ~ Schützenweg 3 eMail: gquell@skequell.de Fon: 0731-26400651 ~ 89275 Elchingen web : http://www.skequell.de Fax: 0731-26400652 - ---Aus Sicherheitsgründen: bitte keine Word-, Excel-Dateianhänge ----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFADSbjvHbZD0c+xTwRAlNqAJ491w282j/5yMc1/zV5CnvGsGA+8ACfd404 cpsGmCIFUkaXCKLWv1OFLRs= =XT4C -----END PGP SIGNATURE----- _______________________________________________ Python-de maillist - Python-de@python.net http://python.net/mailman/listinfo/python-de