About 50 results
Open links in new tab
  1. python - What is the purpose of the return statement? How is it ...

    The simple truth is that print and return have nothing to do with each other. print is used to display things in the terminal (for command-line programs). 1 return is used to get a result back when you call a …

  2. What is the return value of os.system () in Python?

    On Unix, the return value is the exit status of the process encoded in the format specified for wait (). Note that POSIX does not specify the meaning of the return value of the C system () function, so the …

  3. python - Running shell command and capturing the output - Stack …

    If you use the subprocess python module, you are able to handle the STDOUT, STDERR and return code of command separately. You can see an example for the complete command caller …

  4. python tkinter return value from function used in command

    Oct 27, 2012 · The only known way to get the return value of a button command is by using button.invoke(). Tkinter wraps the button command in a tcl function, but the wrapped function returns …

  5. Command "where python" does not return anything in PowerShell

    May 25, 2021 · Command "where python" does not return anything in PowerShell [duplicate] Asked 4 years, 8 months ago Modified 4 years, 8 months ago Viewed 14k times

  6. How to call an external program in python and retrieve the output and ...

    Apr 1, 2009 · How can I call an external program with a python script and retrieve the output and return code?

  7. python - How can you get the SSH return code using Paramiko? - Stack ...

    While you are correct about recv_exit_status, you cannot use it this way, as the code may deadlock. You have to consume the command output, while waiting for the command to finish. See Paramiko ssh …

  8. store return value of a Python script in a bash script

    Aug 10, 2012 · 94 I want to execute a python script from a bash script, and I want to store the output of the python script in a variable. In my python script, I print some stuff to screen and at the end I return …

  9. python - How do I execute a program or call a system command?

    How do I call an external command within Python as if I had typed it in a shell or command prompt?

  10. What does the "yield" keyword do in Python? - Stack Overflow

    Oct 24, 2008 · An expression_list is basically any number of expressions separated by commas - essentially, in Python 2, you can stop the generator with return, but you can't return a value.