From 8a6798fb4fb3a3ad6b74edce4fdb9571965d56a8 Mon Sep 17 00:00:00 2001 From: Bruce Payette Date: Thu, 4 Aug 2016 13:13:21 -0700 Subject: [PATCH] Updated to include Aleksandar's editorial changes; mostly python to Python in the comments. --- demos/python/class1.ps1 | 6 +++--- demos/python/demo_script.ps1 | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/python/class1.ps1 b/demos/python/class1.ps1 index 63362fe502..16b426a91d 100644 --- a/demos/python/class1.ps1 +++ b/demos/python/class1.ps1 @@ -1,10 +1,10 @@ # -# Wrap python script in such a way to make it easy to -# consume from powershell +# Wrap Python script in such a way to make it easy to +# consume from PowerShell # # The variable $PSScriptRoot points to the directory # from which the script was executed. This allows -# picking up the python script from the same directory +# picking up the Python script from the same directory # & $PSScriptRoot/class1.py | ConvertFrom-JSON diff --git a/demos/python/demo_script.ps1 b/demos/python/demo_script.ps1 index 4e1bdd3b04..0544efe15e 100644 --- a/demos/python/demo_script.ps1 +++ b/demos/python/demo_script.ps1 @@ -1,7 +1,7 @@ # # Demo simple interoperation between PowerShell and Python -# Basic execution of a python script fragment +# Basic execution of a Python script fragment python -c "print('Hi!')" # Capture output in a variable @@ -13,7 +13,7 @@ $data # Use in expressions 5 + (python -c "print(2 + 3)") + 7 -# Create a python script using a PowerShell here-string, no extension +# Create a Python script using a PowerShell here-string, no extension @" #!/usr/bin/python3 print('Hi!') @@ -25,7 +25,7 @@ chmod +x hi # Run it - shows that PowerShell really is a shell ./hi -# A mode complex script that outputs JSON +# A more complex script that outputs JSON cat class1.py # Run the script @@ -49,7 +49,7 @@ cat class1.ps1 # And run it, treating the output as structured data. (./class1)[1].buz[1] -# Finally a PowerShell script with in-line python +# Finally a PowerShell script with in-line Python cat inline_python.ps1 # and run it