Skip to content

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

Open
alanbacon wants to merge 4 commits intoalexcouper:masterfrom
alanbacon:arrays
Open

PR:1 Get results split over multiple lines as a list#13
alanbacon wants to merge 4 commits intoalexcouper:masterfrom
alanbacon:arrays

Conversation

@alanbacon
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant