title: glob error <_io.TextIOWrapper name='...' mode='r' encoding='cp1252'> reading text file error
body: <p>I am trying to make a social program where the profiles are stored in .txt files
  here is part of the code:</p>
  
  <pre><code>XX = []
  pl = glob.glob('*.txt')
  for a in pl:
       if ' pysocial profile.txt' in a:
           print(a)
           O = 2
           XX.append(a)
           if O == 2:
                P = input('choose profile&gt;')
                if P in XX:
                  G = open(P, 'r')
                print(G)
  </code></pre>
  
  <p>I try this, but when it executes the "print(G)" part it come out with this:</p>
  
  <p><code>&lt;_io.TextIOWrapper name='Freddie Taylor pysocial profile.txt' mode='r' encoding='cp1252'&gt;</code>.</p>
  
  <p>How can I make it read the file?</p>