import re 
import os 
import logging

def main():

    logging.basicConfig(filename='app.log', level=logging.DEBUG)

    basePath = "D:\Programming\PythonProgects\PinterestParse\html"

    fileForParse = os.path.join(basePath,os.listdir(basePath)[0])

    logging.debug(fileForParse)

    openedFile = open(fileForParse, 'r')

    logging.debug(openedFile.read().decode('cp-1251'))



if __name__ =='__main__':
    main()