old_contents: #!/usr/bin/python3.4
  # -*-coding:Utf-8 -*
  import os
  
  def saveSettings(s):
  	global scriptSettings
  	setFile = open(os.getcwd()+'/settings','w')
  	setFile.write(s.toXmlStr(True))
  	setFile.close()
  
  def saveQueue(q):
  	global renderQueue
  	queueFile = open(os.getcwd()+'/queue','w')
  	queueFile.write(q.toXmlStr(True))
  	queueFile.close()
  
new_contents: #!/usr/bin/python3.4
  # -*-coding:Utf-8 -*
  import os
  
  def saveSettings(s):
  	global scriptSettings
  	with open(os.getcwd()+'/settings','w') as setFile:
  		setFile.write(s.toXmlStr(True))
  
  def saveQueue(q):
  	global renderQueue
  	with open(os.getcwd()+'/queue','w') as queueFile:
  		queueFile.write(q.toXmlStr(True))
  
  
subject: modify file openning method (use 'with open(…)as file:' syntax)