Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-05-22 09:10:28


Author: troy
Date: 2008-05-22 09:10:27 EDT (Thu, 22 May 2008)
New Revision: 45651
URL: http://svn.boost.org/trac/boost/changeset/45651

Log:
needed for python testing
Added:
   branches/CMake/Boost_1_35_0/libs/python/test/pyrun.py (contents, props changed)

Added: branches/CMake/Boost_1_35_0/libs/python/test/pyrun.py
==============================================================================
--- (empty file)
+++ branches/CMake/Boost_1_35_0/libs/python/test/pyrun.py 2008-05-22 09:10:27 EDT (Thu, 22 May 2008)
@@ -0,0 +1,11 @@
+# Simple Python script that acts as a bridge to any other Python
+# script. It first sets sys.path to the first argument, then runs the
+# script specified by the second argument. All remaining arguments are
+# passed to the script.
+import sys
+sys.argv[0] = sys.argv[2]
+sys.path.insert(0, sys.argv[1])
+script_file = open(sys.argv[2], "r")
+sys.argv.pop(1)
+sys.argv.pop(1)
+exec(script_file)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk