Thanks guys! You made it work.
>On Apr 9, 12:55�pm, Chris Rebert wrote:
> On Thu, Apr 9, 2009 at 12:42 PM, Lydia wrote:
> > Hi Python users,
>
> > I ran into a problem with python coding in ARCGIS. Does anybody have the
> > experience in dealing with this?
>
&g
return \"B\" \\
else: return \"\" "
- Original Message -
From: "Chris Rebert"
To: "Lydia"
Cc:
Sent: Thursday, April 09, 2009 1:55 PM
Subject: Re: calculate field in ARCGIS
On Thu, Apr 9, 2009 at 12:42 PM, Lydia wrote:
Hi Python users,
I ran in
ef codefun(code): if code == 0: return \"B\" else: return \"\" "
gp.CalculateField_management("INFILE", "OLDFIELD", "codefun(!NEWFIELD!",
"PYTHON", codeblock)
I got error:
RuntimeError:
exceptions.SyntaxError: invalid synta
.Next()
del cur
del row
But the out looks like only B was calculated to A successfully. C&D are not in
A.
I guess there must be something wrong with the code, but I am very new to
Python, and not familiar with the expression. Could anybody help ? PS. I am
coding Python with ARCGIS.
Thanks a lot.
Lydia
--
http://mail.python.org/mailman/listinfo/python-list