OLD | NEW |
1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
2 | 2 |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
3 """Visual Studio user preferences file writer.""" | 7 """Visual Studio user preferences file writer.""" |
4 | 8 |
5 import common | 9 import common |
6 import os | 10 import os |
7 import re | 11 import re |
8 import socket # for gethostname | 12 import socket # for gethostname |
9 import xml.dom | 13 import xml.dom |
10 import xml.dom.minidom | 14 import xml.dom.minidom |
11 | 15 |
12 | 16 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 config.appendChild(n_cmd) | 173 config.appendChild(n_cmd) |
170 break | 174 break |
171 | 175 |
172 def Write(self, writer=common.WriteOnDiff): | 176 def Write(self, writer=common.WriteOnDiff): |
173 """Writes the user file.""" | 177 """Writes the user file.""" |
174 f = writer(self.user_file_path) | 178 f = writer(self.user_file_path) |
175 self.doc.writexml(f, encoding='Windows-1252', addindent=' ', newl='\r\n') | 179 self.doc.writexml(f, encoding='Windows-1252', addindent=' ', newl='\r\n') |
176 f.close() | 180 f.close() |
177 | 181 |
178 #------------------------------------------------------------------------------ | 182 #------------------------------------------------------------------------------ |
OLD | NEW |