311 src = Utilities.readEncodedFile(file)[0] |
311 src = Utilities.readEncodedFile(file)[0] |
312 except (UnicodeError, IOError): |
312 except (UnicodeError, IOError): |
313 # can't do anything with this module |
313 # can't do anything with this module |
314 _modules[module] = dictionary |
314 _modules[module] = dictionary |
315 return dictionary |
315 return dictionary |
|
316 # convert eol markers the Python style |
|
317 src = src.replace("\r\n", "\n").replace("\r", "\n") |
316 |
318 |
317 visitor = Visitor(src, module, file) |
319 visitor = Visitor(src, module, file) |
318 dictionary = visitor.parse() |
320 dictionary = visitor.parse() |
319 _modules[module] = dictionary |
321 _modules[module] = dictionary |
320 return dictionary |
322 return dictionary |