Dec-07-2017, 12:18 PM
first of all, post all of your code, traceback, output, etc. in respective tags. See BBcode help for more info.
That said, you don't need to work directly with
That said, you don't need to work directly with
io module
- this is going too low level. Just use built-in open()
function to access the file. And use with
context manager, e.g.with open('test.html') as f: # do somethingAlso, given that this is html file, you may want to use special packages (e.g. Beautiful Soup) to parse the content of the file.
re
(RegEx) in not a tool to use in this case.