Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
python:subprocess [2022-07-10 Sun wk27 10:16] – [subprocess module] baumkppython:subprocess [2023-09-16 Sat wk37 08:46] – [Some on line resources] baumkp
Line 1: Line 1:
-======Python Programming Note======+======Python Programming Notes======
 Here are my notes from starting to use and learn the python programming language. Here are my notes from starting to use and learn the python programming language.
 I am only focusing on Python 3 at this time. I am only focusing on Python 3 at this time.
Line 13: Line 13:
     * the output value can be captured from ''subprocess.stdout'', this is in byte format.       * the output value can be captured from ''subprocess.stdout'', this is in byte format.  
     * It can be captured and converted to text format ''subprocess.stdout.decode('utf-8')''     * It can be captured and converted to text format ''subprocess.stdout.decode('utf-8')''
-    * The return code of the function can be capture from output +    * The return code of the function can be capture from output using  ''subprocess.returncode''
  
- +=====Python Back-up Scripts===== 
-====Some on line resources====+My python based back-up scripts are located here: [[home_server:home_server_setup:other_services:back-up_server#python_backup_scripts]] 
 +=====Some on line resources=====
   *[[https://docs.python.org/3/library/subprocess.html#popen-objects|Python Docs - Subprocess management]]   *[[https://docs.python.org/3/library/subprocess.html#popen-objects|Python Docs - Subprocess management]]
 +  *[[https://www.geeksforgeeks.org/python-execute-and-parse-linux-commands/|Python | Execute and parse Linux commands]]
 +  *[[https://www.golinuxcloud.com/python-subprocess/|10+ practical examples to learn python subprocess module]]
 +  *[[https://stackoverflow.com/questions/49371575/print-subprocess-popen|Print Subprocess.Popen]]
 +  *[[https://www.pythonpool.com/python-bytes-to-string/|5 Ways to Convert bytes to string in Python]]
 +  *[[https://opensourceoptions.com/blog/how-to-pass-arguments-to-a-python-script-from-the-command-line/|How to Pass Arguments to a Python Script from the Command Line]]
 +  *[[https://www.golinuxcloud.com/python-write-to-file/|How to create, read, append, write to file in Python]]
 +  *[[https://www.programiz.com/python-programming/exception-handling|Python Exception Handling Using try, except and finally statement]]
 +
 +<- project:index|Back ^ project:index|Start page ^ project:LEDS|Next ->
  • /app/www/public/data/pages/python/subprocess.txt
  • Last modified: 2023-12-26 Tue wk52 11:47
  • by baumkp