On Thu, Jan 13, 2011 at 1:51 PM, Christian Witts <[email protected]> wrote:
> First split your path into segments, then iterate over those segments and
> build your new list (item one being the current segment, and part two a
> joined string of previous segments).
>
thanks Christian,
path =
'Audio/site-packages/pygame/examples/macosx/aliens_app_example/English.lproj'
path=urllib.url2pathname(path)
print '\n',path
pathlist=[]
dir=''
for item in path.split("\\"):
dir=os.path.join(dir,item)
a=[item,dir]
pathlist.append(a)
print pathlist
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor