import arcpy import os getInputTxt = arcpy.GetParameterAsText(0) txtFile = os.path.join(arcpy.env.scratchFolder, "myTxt.txt") f = open(txtFile, 'w') f.writelines(getInputTxt) f.close arcpy.SetParameterAsText(1, txtFile)
arcpy.env.scratchWorkspace = r"C:\temp\pppp"
I know this is an old post, but when I came across it it was exactly what I needed. There needs to be more of this mindset ("don't overthink it") in the help text for ArcGIS development in general. Until you do it for the first time, it's all foreign and doesn't exactly make sense. Thanks for this gem Kevin.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.