syntax error in python

Lalit lalitkrishna at gmail.com
Wed Feb 20 17:06:24 EST 2008


On Feb 20, 2:03 pm, Lalit <lalitkris... at gmail.com> wrote:
> Hi
> I am executing following commands.>>> test = os.path.isfile('c:\\src\\kasjdfl.txt')
> >>> print test
>
> True
> ------------working fine but for below statement it is giving syntax
> error.
>
> >>> if (os.path.isfile('c:\\src\\kasjdfl.txt'))
>
> SyntaxError: invalid syntax
>
> any idea what is incorrect in my syntax

oops got the mistake I was nt ending if with :
sorry and thanks



More information about the Python-list mailing list