Hallo Andreas,
ganz einfach dein array enthält keine Strings. Versuchs mal so:
array = ["1234", "4567"]
Gruß
Fritz
On Thu, 20 Jan 2005 17:35:03 +0100
Andreas Protze
Hallo,
habe folgende Frage. Kann ich "re.search" nicht ein Stringarray übergeben? Führt immer zum Fehler!! Ich möchte einfach nur aus eine Textdatei nach einem Textmuster suchen..... (Zeilenweise)
Warum kann dies nicht ausgeführt werden? Ist nicht das komplette Proggi.
Vielen Dank für Eure Hilfe
Andreas
import sys import re import string
array = [1234, 4567]
src=open("xxx.txt", "r") srclines= src.readlines() src.close()
for line in srclines: if re.search(arry[i], line): ^^^^ stößt auf Probleme
_______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
_______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de