#!/usr/bin/python3

#### Libraries ####
from datetime import datetime
import time, os, pygame
from pygame.locals import *
import picamera
import http.client

### Settings ###
camera = picamera.PiCamera()
camera.hflip = True
camera.vflip = True
camera.resolution = (1024, 768)

#### Functions ####

def connected():
    conn = http.client.HTTPConnection("www.google.de")
    try:
        conn.request("HEAD", "/")
        return True
    except:
        return False

def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


#### MAIN PROGRAM ####


try:
    if connected():
        make_foto()
    else:
        print("not connected")


finally:
    os.system('clear')
#    sense.clear()
#    pygame.display.quit()

67bdb13bb181f264e484a441ebd78bba184d5745
<mask token>


def connected():
    conn = http.client.HTTPConnection('www.google.de')
    try:
        conn.request('HEAD', '/')
        return True
    except:
        return False


def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


<mask token>

<mask token>


def connected():
    conn = http.client.HTTPConnection('www.google.de')
    try:
        conn.request('HEAD', '/')
        return True
    except:
        return False


def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


try:
    if connected():
        make_foto()
    else:
        print('not connected')
finally:
    os.system('clear')

<mask token>
camera = picamera.PiCamera()
camera.hflip = True
camera.vflip = True
camera.resolution = 1024, 768


def connected():
    conn = http.client.HTTPConnection('www.google.de')
    try:
        conn.request('HEAD', '/')
        return True
    except:
        return False


def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


try:
    if connected():
        make_foto()
    else:
        print('not connected')
finally:
    os.system('clear')

from datetime import datetime
import time, os, pygame
from pygame.locals import *
import picamera
import http.client
camera = picamera.PiCamera()
camera.hflip = True
camera.vflip = True
camera.resolution = 1024, 768


def connected():
    conn = http.client.HTTPConnection('www.google.de')
    try:
        conn.request('HEAD', '/')
        return True
    except:
        return False


def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


try:
    if connected():
        make_foto()
    else:
        print('not connected')
finally:
    os.system('clear')

#!/usr/bin/python3

#### Libraries ####
from datetime import datetime
import time, os, pygame
from pygame.locals import *
import picamera
import http.client

### Settings ###
camera = picamera.PiCamera()
camera.hflip = True
camera.vflip = True
camera.resolution = (1024, 768)

#### Functions ####

def connected():
    conn = http.client.HTTPConnection("www.google.de")
    try:
        conn.request("HEAD", "/")
        return True
    except:
        return False

def make_foto():
    camera.capture('doc_pic.jpg')
    camera.close()


#### MAIN PROGRAM ####


try:
    if connected():
        make_foto()
    else:
        print("not connected")


finally:
    os.system('clear')
#    sense.clear()
#    pygame.display.quit()
