title: Why is Python giving me "an integer is required" when it shouldn't be?
body: <p>I have a save function within my Python program which looks like this:</p>
  
  <pre><code>def Save(n):
      print("S3")
      global BF
      global WF
      global PBList
      global PWList
      print(n)
      File = open("C:\KingsCapture\Saves\\" + n + "\BF.txt", "w")
      pickle.dump(BF, File)
      File = open("C:\KingsCapture\Saves\\" + n + "\WF.txt", "w")
      pickle.dump(WF, File)
      File = open("C:\KingsCapture\Saves\\" + n + "\PBList.txt", "w")
      pickle.dump(PBList, File)
      File = open("C:\KingsCapture\Saves\\" + n + "\PWList.txt", "w")
      pickle.dump(PWList, File)
  </code></pre>
  
  <p>Here, n is "1".</p>
  
  <p>I get an error looking like this:</p>
  
  <pre><code>  File "C:/Python27/KingsCapture.py", line 519, in Save
      File = open("C:\KingsCapture\Saves\\" + n + "\BF.txt", "w")
  TypeError: an integer is required
  </code></pre>
  
  <p>Upon doing the same loading within the shell, I get no errors:</p>
  
  <pre><code>&gt;&gt;&gt; File = open("C:\KingsCapture\Test\List.txt", "r")
  &gt;&gt;&gt; File = open("C:\KingsCapture\Test\List.txt", "w")
  &gt;&gt;&gt; n = "1"
  &gt;&gt;&gt; File = open("C:\KingsCapture\Saves\\" + n + "\BF.txt", "r")
  &gt;&gt;&gt; File = open("C:\KingsCapture\Saves\\" + n + "\BF.txt", "w")
  </code></pre>
  
  <p>Why is this having a problem?</p>