[Tutor] Struggling with os.exec

Charlie Clark charlie@begeistert.org
Thu May 22 11:03:02 2003


On 2003-05-21 at 20:59:40 [+0200], you wrote:
> > has a bash (2.03) shell so this is essentially a "posix" question
> and "cd"
> > is obviously a built-in command. Is it still possible to call "cd"
> from
> > within Python?
> 
> You might need to do "bash -c 'cd /foo/bar'" or somesuch instead.
> 
> Just a guess, so probably wrong! :-/

That works without the 's but has seems to call the function "cd" as a 
process in it's own write, ie. with it's own environment variables. What I 
need to do is to be able to change the variables in the parent process, the 
one from which Python is called. I thought this would be easy but it's 
turning into a real challenge... ie., I'm still open for ideas!

Charlie (currently working through the online manual for the bash shell)