count = 10000
timer = timeit.Timer('hallo('+str(count)+')', 'from test import hallo')
Oder gibt's da 'ne schönere Lösung?
Gruß
mutetella
@BlackJack:
Werd' mich jetzt auch mal mit profile beschäftigen, wenn ich timeit() kapiert hab'....

Code: Alles auswählen
count = 10000
timer = timeit.Timer('hallo(%s)'%count, 'from test import hallo')