So I tried this if(not (attr=global_re.match(line)) ): break
it says invalid syntax [on the =] so it is not possible to do test and assignment in C style? how can I write this otherwise? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypic.co.nr -- http://mail.python.org/mailman/listinfo/python-list