Skip to content

Commit 4ac17f1

Browse files
StartAutomatingStartAutomating
authored andcommitted
docs: Updating Python Examples
Using Template.HelloWorld.py
1 parent 7b61712 commit 4ac17f1

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

docs/Language.Python.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,14 @@ PipeScript can be included in a Python string that starts and ends with ```{}```
2020
> EXAMPLE 1
2121
2222
```PowerShell
23-
{
24-
$pythonContent = @'
25-
"""{
26-
$msg = "Hello World", "Hey There", "Howdy" | Get-Random
27-
@"
28-
print("$msg")
29-
"@
30-
}"""
31-
'@
32-
[OutputFile('.\HelloWorld.ps1.py')]$PythonContent
33-
}
34-
.> .\HelloWorld.ps1.py
23+
.\HelloWorld.py
24+
Invoke-PipeScript .\HelloWorld.py
3525
```
3626
> EXAMPLE 2
3727
3828
```PowerShell
39-
.\HelloWorld.py
40-
Invoke-PipeScript .\HelloWorld.py
29+
Template.HelloWorld.py -Message "Hi" | Set-Content ".\Hi.py"
30+
Invoke-PipeScript .\Hi.py
4131
```
4232

4333
---

0 commit comments

Comments
 (0)