I have started learning Python for ArcGIS last week and have a simple script to reproject all the datasets in a folder. The script says "syntax error- invalid syntax" but I can't find anything. Can someone please have a look? It seems something very basic but I'm pretty new so I don't see it at the moment. Also running this in ArcGIS prints "failed" right away. And the files are in place in the right folders. I have already checked.
... sourceWorkspace = "C:\\Users\\tx8p90\\Desktop\\Lesson2"
... targetProjection = "C:\\Users\\tx8p90\\Desktop\\python excercise data\\Lesson1\\contourlines.shp"
... listDataSet = arcpy.ListDatasets(sourceWorkspace)
... for x in listDataset:
... outputDataset = sourceWorkspace + "\\projected_" + x
... arcpy.Project_management(x, outputDataset, targetProjection)
... print "Reprojection successful"
... print arcpy.GetMessages()
... print "failed"