]> granicus.if.org Git - python/commitdiff
Make it a bit easier to test Tcl/Tk and idle from a build dir.
authorChristian Heimes <christian@cheimes.de>
Tue, 18 Dec 2007 09:00:13 +0000 (09:00 +0000)
committerChristian Heimes <christian@cheimes.de>
Tue, 18 Dec 2007 09:00:13 +0000 (09:00 +0000)
Lib/lib-tk/FixTk.py
PCbuild9/idle.bat [new file with mode: 0644]

index a7801a2507230e60f1343a053114d4b825597f8c..346d3c34cf2d4ff21d368a8b410114b6d6b642e2 100644 (file)
@@ -11,6 +11,10 @@ import sys, os
 # the real Tcl library will do.
 
 prefix = os.path.join(sys.prefix,"tcl")
+if not os.path.exists(prefix):
+    # devdir/../tcltk/lib
+    prefix = os.path.join(sys.prefix, os.path.pardir, "tcltk", "lib")
+    prefix = os.path.abspath(prefix)
 # if this does not exist, no further search is needed
 if os.path.exists(prefix):
     if not os.environ.has_key("TCL_LIBRARY"):
diff --git a/PCbuild9/idle.bat b/PCbuild9/idle.bat
new file mode 100644 (file)
index 0000000..dcb0485
--- /dev/null
@@ -0,0 +1,15 @@
+@echo off
+rem start idle
+rem Usage:  idle [-d]
+rem -d   Run Debug build (python_d.exe).  Else release build.
+
+setlocal
+set exe=python
+PATH %PATH%;..\..\tcltk\bin
+
+if "%1"=="-d" (set exe=python_d) & shift
+
+set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+echo on
+%cmd%