Hi Clayton,
I'm not too familiar with development on Windows, unfortunately, but I
think the 'subprocess' module is what you're looking for.
https://docs.python.org/3/library/subprocess.html
For example:
http://stackoverflow.com/questions/748028/how-to-get-output-of-exe-in-python-script
sh
"Clayton Kirkwood" writes:
> Looked all over, but haven't found the answer.
Did you look in the Python standard library documentation
https://docs.python.org/3/library/>?
> If I have a (windows) program which I wish to start, even shell
> scripts, and possibly capture the output from, how do I
Looked all over, but haven't found the answer. If I have a (windows) program
which I wish to start, even shell scripts, and possibly capture the output
from, how do I do that?
Thanks,
C
PS, also, please me to where I can find more. My searches were rather
useless.
_
On 05/11/16 12:07, Peter Otten wrote:
> sum_highest = lambda items, n: sum(sorted(items, reverse=True)[:max(n, 0)])
>
> or better:
>
> import heapq
>
> def sum_highest(items, n):
> return sum(heapq.nlargest(n, items))
No, the first solution is "better" because it used lambda
and slicing a
Lloyd Francis wrote:
> I want to write a function that will calculate and return the sum of the
> *n* highest value in a list *a. *Also, when n is less than 0, the answer
> should be zero, and if n is greater than the number of elements in the
> list, all elements should be included in the sum.
>