Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit f2f3f2b

Browse files
author
Thomas Ingleby
committed
hello-world: add Python
Added extra of checking for an EnvVar, Useful so we know if end-user sets up the envs based on the JSON format Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
1 parent 0c351e6 commit f2f3f2b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

hello-world/python/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python3
2+
# (C) Copyright 2018, Intel Corporation
3+
# SPDX-License-Identifier: MIT
4+
import os
5+
6+
extra = os.getenv("HW", "Nothing")
7+
print("Hello World! I see " + extra)

hello-world/python/python.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"main": "main.py",
3+
"environmentVariables": {
4+
"HW": "fish"
5+
}
6+
}

0 commit comments

Comments
 (0)