I have the following code:
# script0.py
def main():
p4 = p4python.P4.P4()
p4.connect()
print os.environ['P4CONFIG']
print p4.p4config_file
p4.disconnect()
which is being called via:
# script0_test.py
subprocess.check_call(['script0.py'])
and is outputting:
.p4config
noconfig
When script0.py is called from the command line or if subprocess.check_call(shell=True) is used, it outputs correct info:
.p4config
/home/nyap/proj/.p4config
Why does the p4 object not recognize the P4CONFIG setting when shell=False?