MRAB wrote:
> You might also want to try a triple-quoted string, which makes it
> clearer:
>
> codeblock = """def codefun(code):
> if code == 0:
> return "B"
> else:
> return ""
> """
>
Possibly the clearest way to do something like that is to use a single
backslas
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?
>
> > I need to calculate NEWFIELD bas
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?
>
> > I need to calculate NEWFIELD based on OLDFIELD under condition: if
- 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 into a problem with python coding in ARCGIS. Does anybody
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
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?
>
> I need to calculate NEWFIELD based on OLDFIELD under condition: if OLDFIELD
> == 0 then return string "B" otherwise
Hi Python users,
I ran into a problem with python coding in ARCGIS. Does anybody have the
experience in dealing with this?
I need to calculate NEWFIELD based on OLDFIELD under condition: if OLDFIELD ==
0 then return string "B" otherwise return "".
codeblock = "def codefun(code): if code == 0