Skip to content

Instantly share code, notes, and snippets.

View charliejllewellyn's full-sized avatar

charliejllewellyn charliejllewellyn

View GitHub Profile
import subprocess as sub
import boto3
import os
def getObj():
os.chdir('/tmp')
s3 = boto3.resource('s3')
s3.meta.client.download_file('cjl-chelt-hack', 'masterbuilder.jpg', 'masterbuilder.jpg')
p = sub.Popen(['file', 'masterbuilder.jpg'],stdout=sub.PIPE,stderr=sub.PIPE)
output, errors = p.communicate()