title: How to alter a python script with arcpy.GetParameterAsText when run as a stand alone script?
body: <p>I have created a python script that runs from an ArcMap 10.1 session; however, I would like to modify it to run as a stand alone script, if possible. The problem is I don't see a workaround for prompting the user for the parameters when executed outside ArcMap.</p>
  
  <p>Can this even be reasonably done? If so, how would I approach it? Below is a sample of my script. How can I modify this to prompt the user at the command line for the path names of parameters 0 and 1?</p>
  
  <pre><code>import arcpy
  arcpy.env.overwriteOutput = True
  
  siteArea = arcpy.GetParameterAsText(0)
  tempGDB_Dir =  arcpy.GetParameterAsText(1)
  tempGDB = tempGDB_Dir + "\\tempGDB.gdb"
  
  #  Data from which records will be extracted
  redWoods = "D:\\Data\\GIS\\Landforms\\Tress.gdb\\Redwoods"
  # List of tree names that will be used in join
  treesOfInterest = "C:\\Data\\GIS\\Trees\\RedwoodList.dbf"
  
  inFeature = [redWoods, siteArea]
  tempFC = tempGDB_Dir + "\\TempFC"
  tempFC_Layer = "TempFC_Layer"
  output_dbf = tempGDB_Dir + "\\Output.dbf"
  
  #  Make a temporaty geodatabase
  arcpy.CreateFileGDB_management(tempGDB_Dir, "tempGDB.gdb")
  
  #  Intersect trees with site area
  arcpy.Intersect_analysis([redWoods, siteArea], tempFC, "ALL", "", "INPUT")
  #  Make a temporary feature layer of the results
  arcpy.MakeFeatureLayer_management(tempFC, tempFC_Layer)
  
  #  Join redwoods data layer to list of trees
  arcpy.AddJoin_management(tempFC_Layer, "TreeID", treesOfInterest, "TreeID", "KEEP_COMMON")
  
  #  Frequency analysis - keeps only distinct species values
  arcpy.Frequency_analysis(tempFC_Layer, output_dbf, "tempFC.TreeID;tempFC.TreeID", "")
  
  #  Delete temporary files
  arcpy.Delete_management(tempFC_Layer)
  arcpy.Delete_management(tempGDB)
  </code></pre>
  
  <p>This is as much a philosophical question as it is a programmatic one. I am interested in whether this can be done and the amount of effort to do it this way. Is the effort worth the convenience of not opening up a map document?</p>