From 40de87995b901f72a4dd1f394af3c20c24c73541 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sun, 13 Sep 2020 16:49:33 -0500 Subject: small class exmaple with a global variable --- aws-list-ec2.py | 5 +++++ foo.py | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 aws-list-ec2.py create mode 100644 foo.py diff --git a/aws-list-ec2.py b/aws-list-ec2.py new file mode 100644 index 0000000..1a7fc5a --- /dev/null +++ b/aws-list-ec2.py @@ -0,0 +1,5 @@ +import boto3 + +ec2 = boto3.resource('ec2') +for i in ec2.instances.all(): + print(i.id) \ No newline at end of file diff --git a/foo.py b/foo.py new file mode 100644 index 0000000..823d1f7 --- /dev/null +++ b/foo.py @@ -0,0 +1,10 @@ +class Foo: + pass +def hello(): + print('hello, world') +x = 13 + +class Square(): + def __init__(self, x): + self.inital = x + self.squared = x**2 -- cgit v1.2.3