Pankaj wrote:
> [...]
> ****************************************
> What i tried in python was::
> ****************************************
> 
> f = open( "./1.c", "r")
> fNew = open( "./1_new.c", "w")
> for l in f:
>         print l
>         lineno = lineno + 1
>         strToFind = "for\((.*)\;(.*)"
> [...]

Regular expressions are not handled automatically in Python the way you 
apparently think they are.

In Python, you will need to use the "re" module:

http://docs.python.org/lib/module-re.html

-- Gerhard
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to