newb: glob on windows os.renames creates many nested folders

crybaby joemystery123 at gmail.com
Sat Sep 22 22:39:43 EDT 2007


when I do this in my python code and run it in windows xp, it creates
ctemp/..../.../.../../ so on and creates file t.  Not file starting
with the name complist and ending with .txt (complist*.txt).  Any idea
why this may be? glob only works in *nix not on windows?

os.renames(glob.glob('complist*.txt')
[0],r'temp/'.join(glob.glob('complist*.txt')[0]))




More information about the Python-list mailing list