[python-win32] error in list length

kNish singhai.nish at gmail.com
Thu Jul 10 07:49:20 CEST 2008


Hi,

              The following lines of code gives an error starting with line
where len() is used


                local_BkFiles = glob.glob(localDirectoryName+'\\*' + data +
'*bk*')
local_BkFiles.sort(key=str.upper)
last_pv_File_Name = local_PvFiles[len(local_PvFiles)-1]
split_last_pv_File_Name =
re.search(data+"_bk[0-9]{2}_[a-z]{3}_pv[0-9]{2}",last_pv_File_Name )
lastPv_FileVersion =
re.search('(?<=pv)\d+',split_last_pv_File_Name.group(0))


This code is being called in a procedure or function def. How may I solve
this.


BRgds,


kNish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080710/29654c54/attachment.htm>


More information about the python-win32 mailing list