First, make sure that your C:\temp\output\ directory already exists, because it will not be created automatically...
Second, I edited my previous post to include the line arcpy.env.overwriteOutput = True which can go just after your import statement... It will make so that no error is thrown when you try to overwrite an existing file... What probably happened is that it ran fine the first time (in ArcGIS) because your output folder was empty, but when you ran it again (in PythonWin) the shapefile already existed..
If neither of those is of any help, then please post your error code...
Jason