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

« back to all changes in this revision

Viewing changes to services/python-console

  • Committer: William Grant
  • Date: 2010-02-26 04:05:57 UTC
  • Revision ID: grantw@unimelb.edu.au-20100226040557-xttf63vmxjs1oh8v
Shuffle all of the manual instructions one layer deeper, into the 'Manual steps' section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import cPickle
9
9
import cStringIO
10
10
import md5
 
11
import os
11
12
import Queue
12
13
import signal
13
14
import socket
420
421
if __name__ == "__main__":
421
422
    port = int(sys.argv[1])
422
423
    magic = sys.argv[2]
 
424
    
 
425
    # Sanitise the Enviroment
 
426
    os.environ = {}
 
427
    os.environ['PATH'] = '/usr/local/bin:/usr/bin:/bin'
 
428
 
 
429
    if len(sys.argv) >= 4:
 
430
        # working_dir
 
431
        os.chdir(sys.argv[3])
 
432
        os.environ['HOME'] = sys.argv[3]
423
433
 
424
434
    # Make python's search path follow the cwd
425
435
    sys.path[0] = ''