execute bash builtins in python

alex goretoy agoretoy at gmail.com
Sat Mar 13 09:42:36 CET 2010


I found this to be even better; maybe someone will find this useful, who
knows.
just export PS1, duh
Popen(["bash -c 'export PS1='python'; source
$HOME/.bashrc;alias'"],shell=True,stdout=PIPE).stdout.read()

-Alex Goretoy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100313/c379f35f/attachment.html>


More information about the Python-list mailing list