os.popen('alias')

Belebele beluchin at gmail.com
Fri Nov 18 15:31:06 EST 2005


>From an interactive python shell, I execute the following:

                import os
                for line in os.popen('alias').readlines():
                          print line


No aliases are printed.

I started python from an bash environment that had many aliases
defined. I expected to see the list of aliases from within the
interactive python shell. What could I do to see those aliases defined
in the shell from where I started python?

Thanks:

Belebele




More information about the Python-list mailing list