linux - permanently change directory python scripting/what environment do python scripts run in? -
i have small git_cloner script clones companies projects correctly. in scripts, use func hasn't given me problems yet: def call_sp( command, **arg_list): p = subprocess.popen(command, shell=true, **arg_list) p.communicate() at end of individual script, use: call_sp('cd {}'.format(branch_path)) this line not change terminal ran script in directory branch_path, in fact, worse, annoyingly asks me password! when removing cd yadayada line above, script no longer demands password before completing. wonder: how these python scripts running? since cd command had no permanent effect. assume script splits own private subprocess separate terminal doing, kills when script finishes? based on how #1 works, how force scripts change terminal directory permanently save me time, why merely running change directory ask me password? the full script below, thank you, cody #!/usr/bin/env python import subprocess import sys import time os.path import exp...