regular expression error ?

Lance Hoffmeyer lance at
Mon May 15 22:23:49 CEST 2006

why isn't recognizing "file"?  I can print the contents of "file".

import win32com.client
import re

print file

match ='(Table ?)', file)
if match:
   print "Table Number is: ",

Traceback (most recent call last):
  File "", line 21, in ?
    match ='(Table ?)', file)
  File "C:\Python24\Lib\", line 134, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or buffer

More information about the Python-list mailing list