Changing a shell's current directory with python

Andy B. abuecker at gmail.com
Sun Dec 18 19:22:10 EST 2005


Many thanks for the sanity check.  Just wanted to check with the gurus
before heading down another path.

-A


On 12/18/05, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Sun, 18 Dec 2005 15:53:11 -0800, "Andy B." <abuecker at gmail.com>
> declaimed the following in comp.lang.python:
>
> > I've got a python utility that I want to change my shell's current
> > directory based on criteria it finds.  I've scoured google and the
> > python cookbook and can't seem to figure out if this is even possible.
> >  So far, all my attempts have changed the current python session only.
> >  Am I going to have to wrap this in a shell script?
>
>         That's about all you will be able to achieve... the inheritance goes
> downwards: shell -> program(python, etc.) -> spawned processes
> (os.system, etc.)... Changes at one level are only picked up by things
> started after that change, and started from that level.
> --
>  > ============================================================== <
>  >   wlfraed at ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
>  >      wulfraed at dm.net     |       Bestiaria Support Staff       <
>  > ============================================================== <
>  >           Home Page: <http://www.dm.net/~wulfraed/>            <
>  >        Overflow Page: <http://wlfraed.home.netcom.com/>        <
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list