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
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
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
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