summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-18 09:00:13 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-18 09:00:13 (GMT)
commitbb89992211d4ec95c860ed94f79cdd5f4c18afd1 (patch)
treedebc2d0f3e6220c1f4c886b39422e96a11c965f4
parent8affb5f2360c057176c820efc425906bdb36ee49 (diff)
downloadcpython-bb89992211d4ec95c860ed94f79cdd5f4c18afd1.zip
cpython-bb89992211d4ec95c860ed94f79cdd5f4c18afd1.tar.gz
cpython-bb89992211d4ec95c860ed94f79cdd5f4c18afd1.tar.bz2
Make it a bit easier to test Tcl/Tk and idle from a build dir.
-rw-r--r--Lib/lib-tk/FixTk.py4
-rw-r--r--PCbuild9/idle.bat15
2 files changed, 19 insertions, 0 deletions
diff --git a/Lib/lib-tk/FixTk.py b/Lib/lib-tk/FixTk.py
index a7801a2..346d3c3 100644
--- a/Lib/lib-tk/FixTk.py
+++ b/Lib/lib-tk/FixTk.py
@@ -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
index 0000000..dcb0485
--- /dev/null
+++ b/PCbuild9/idle.bat
@@ -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%