--- startstop_node.py 2008-09-01 17:30:01.000000000 -0500 +++ startstop_node.py 2008-09-01 17:29:41.000000000 -0500 @@ -54,8 +54,20 @@ cmd = find_exe.find_exe('twistd') if not cmd: - print "Can't find twistd (it comes with Twisted). Aborting." - sys.exit(1) + # If the 'twistd' executable can't be found, we have to do some PATH + # manipluations so that the executable can be found. + from pkg_resources import require + twisted_dir = require("Twisted")[0].location + pp = os.path.dirname(twisted_dir) + if os.environ.get('PYTHONPATH', []): + os.environ['PYTHONPATH'] += os.pathsep + pp + else: + os.environ['PYTHONPATH'] = pp + support_bin = os.path.join(os.path.dirname(os.path.dirname( \ + os.path.dirname(os.path.dirname(os.path.abspath(__file__))))), + 'support', 'bin') + sys.path.append(support_bin) + cmd = [os.path.join(support_bin, 'twistd')] cmd.extend(["-y", tac]) if nodetype in ("client", "introducer"):