Re: calling source command within python

2008-07-25 Thread Glenn Hutchings
Jie <[EMAIL PROTECTED]> writes: > i'm having trouble executing os.system('source .bashrc') command > within python, it always says that source not found and stuff. Any > clue? There's no 'source' program; it's a shell builtin. Even if there was, it almost certainly wouldn't do what you want. The

Re: calling source command within python

2008-07-21 Thread arsyed
On Mon, Jul 21, 2008 at 1:59 PM, mk <[EMAIL PROTECTED]> wrote: > Jie wrote: > >> Hi all, >> >> i'm having trouble executing os.system('source .bashrc') command >> within python, it always says that source not found and stuff. Any >> clue? >> > > It _might_ be that the shell it fires up is /bin/sh

Re: calling source command within python

2008-07-21 Thread mk
Jie wrote: Hi all, i'm having trouble executing os.system('source .bashrc') command within python, it always says that source not found and stuff. Any clue? It _might_ be that the shell it fires up is /bin/sh and this in turn is not bash. Anyway, it's better to use subprocess / Popen for th

Re: calling source command within python

2008-07-21 Thread Fredrik Lundh
Jie wrote: i'm having trouble executing os.system('source .bashrc') command within python, it always says that source not found and stuff. Any clue? like in $ python >>> import os >>> os.system("source .bashrc") sh: source not found and stuff 256 ? I get $ python

calling source command within python

2008-07-21 Thread Jie
Hi all, i'm having trouble executing os.system('source .bashrc') command within python, it always says that source not found and stuff. Any clue? Thanks, Jie -- http://mail.python.org/mailman/listinfo/python-list