i used the following code so to persist the directory change after the program exits but the drawback is that it opens a new sub shell , so each tim a run it a new subshell is opened
import os, subprocess
newpath="/usr/local/www/nginx"
oschdir(newpath)
subprocess.call(['bash'])
is there a wayout , i want to do this in FreeBSD 10.1,python3 , irrespective of the shell . Is there a way out.