bash icon indicating copy to clipboard operation
bash copied to clipboard

PR:1 Get results split over multiple lines as a list

Open alanbacon opened this issue 4 years ago • 0 comments

From updated readme:


To get the results (separated by newlines) as a list:

>>> b = bash('ls . ').results()
['bash.pyc', 'tests.pyc']

or use the iterator directly::

>>> b = [res for res in bash('ls . ')]
['bash.pyc', 'tests.pyc']

alanbacon avatar Apr 13 '20 00:04 alanbacon