Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make a tool in ArcToolbox using a Python script so users can input a street and lot number and it will zoom to the correct location/s in the cadastre. It's working but I have to type the name of the street in upper case in the toolbox and I'd like it work for uppercase or lower.

I assume I should use something like .upper() but I don't know where to put it. I've tried and failed in a few places.

Here's my snippet:

RoadName = "'" + arcpy.GetParameterAsText(0) + "'" 
share|improve this question
up vote 9 down vote accepted

This should work:

RoadName = "'" + arcpy.GetParameterAsText(0).upper() + "'" 

You can also use the string module:

import string
RoadName = "'" + string.upper(arcpy.GetParameterAsText(0)) + "'"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.