~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/interpret.py

  • Committer: William Grant
  • Date: 2009-12-14 04:17:46 UTC
  • Revision ID: me@williamgrant.id.au-20091214041746-eurw04xssf4cvszc
Add ivle-dev-setup, a script to do most of the heavy lifting when setting up a new dev installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
    fixup_environ(req, script_path)
140
140
 
141
141
    # usage: tramp uid jail_dir working_dir script_path
142
 
    cmd_line = [trampoline, str(uid), req.config['paths']['jails']['mounts'],
 
142
    pid = subprocess.Popen(
 
143
        [trampoline, str(uid), req.config['paths']['jails']['mounts'],
143
144
         req.config['paths']['jails']['src'],
144
145
         req.config['paths']['jails']['template'],
145
 
         jail_dir, working_dir, interpreter, script_path]
146
 
    # Popen doesn't like unicode strings. It hateses them.
147
 
    cmd_line = [(s.encode('utf-8') if isinstance(s, unicode) else s)
148
 
                for s in cmd_line]
149
 
    pid = subprocess.Popen(cmd_line,
 
146
         jail_dir, working_dir, interpreter, script_path],
150
147
        stdin=f, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
151
148
        cwd=tramp_dir)
152
149
 
435
432
    tramp_dir = os.path.split(tramp)[0]
436
433
 
437
434
    # Fire up trampoline. Vroom, vroom.
438
 
    cmd_line = [tramp, str(user.unixid), config['paths']['jails']['mounts'],
 
435
    proc = subprocess.Popen(
 
436
        [tramp, str(user.unixid), config['paths']['jails']['mounts'],
439
437
         config['paths']['jails']['src'],
440
438
         config['paths']['jails']['template'],
441
 
         jail_dir, working_dir, binary] + args
442
 
    # Popen doesn't like unicode strings. It hateses them.
443
 
    cmd_line = [(s.encode('utf-8') if isinstance(s, unicode) else s)
444
 
                for s in cmd_line]
445
 
    proc = subprocess.Popen(cmd_line,
 
439
         jail_dir, working_dir, binary] + args,
446
440
        stdin=subprocess.PIPE, stdout=subprocess.PIPE,
447
441
        stderr=subprocess.PIPE, cwd=tramp_dir, close_fds=True)
448
442