Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision ceced6bfead67f81cafad47c950e0769e1ba6db0 authored by Zachary Ware on 02 May 2014, 15:51:07 UTC, committed by Zachary Ware on 02 May 2014, 15:51:07 UTC
test_support._is_gui_available is now defined the same way on every platform, and now includes the Windows-specific check that had been in the Windows version of _is_gui_available and the OSX-specific check that was in tkinter.test.support.check_tk_availability. Also, every platform checks whether Tk can be instantiated (if the platform-specific checks passed).
1 parent 3d5c9e2
Tip revision: ceced6bfead67f81cafad47c950e0769e1ba6db0 authored by Zachary Ware on 02 May 2014, 15:51:07 UTC
Issue #18604: Consolidated checks for GUI availability.
Issue #18604: Consolidated checks for GUI availability.
Tip revision: ceced6b
vs9to8.py
from __future__ import with_statement
import os
def vs9to8(src, dest):
for name in os.listdir(src):
path, ext = os.path.splitext(name)
if ext.lower() not in ('.sln', '.vcproj', '.vsprops'):
continue
filename = os.path.normpath(os.path.join(src, name))
destname = os.path.normpath(os.path.join(dest, name))
print("%s -> %s" % (filename, destname))
with open(filename, 'rU') as fin:
lines = fin.read()
lines = lines.replace('Version="9,00"', 'Version="8.00"')
lines = lines.replace('Version="9.00"', 'Version="8.00"')
lines = lines.replace('Format Version 10.00', 'Format Version 9.00')
lines = lines.replace('Visual Studio 2008', 'Visual Studio 2005')
lines = lines.replace('wininst-9.0', 'wininst-8.0')
lines = lines.replace('..\\', '..\\..\\')
lines = lines.replace('..\\..\\..\\..\\', '..\\..\\..\\')
# Bah. VS8.0 does not expand macros in file names.
# Replace them here.
lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')
with open(destname, 'wb') as fout:
lines = lines.replace("\n", "\r\n").encode()
fout.write(lines)
if __name__ == "__main__":
vs9to8(src=".", dest="../PC/VS8.0")
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...