mepardroid

ListWorkspaces method does not work

Discussion created by mepardroid on Mar 4, 2011
Latest reply on Mar 14, 2011 by mwiygul
Hello,

This script is ok when runs in Python, but fails to run when I add it to an ArcToolbox as a script.
As an ArcToolbox script the gp.listworkspaces() method does not list the subfolders of a folder.
Could anyone tell me, why?
Thanks in advance.

import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = r'c:\folder'
wps = gp.listworkspaces()
wps.reset()
wp = wps.next()

while wp:
   wp = wps_cs.Next()

Outcomes