Reading a DHT11 to a file
Here is a list of things I would improve:


define constants in upper-case (PEP8 reference)
put the main program logic into the if __name__ == '__main__': to avoid it being executed on import
naming according to PEP8 - getLine() to get_line() (or even better name would be something like get_stats())
remove unused sys import
follow the PEP8 import organization guidelines
use _ as a throw-away variable name (instead of num)
use str.format() instead of string concatenation 
use more meaningful variable names 


The code after the suggested fixes applied:

#!/usr/bin/python
import time

import Adafruit_DHT


SENSOR = Adafruit_DHT.DHT11
GPIO = 4
MEASUREMENTS_COUNT = 5


def get_stats(array):
    average = sum(array) / float(len(array))
    return "{average},{min},{max}".format(average=average, min=min(array), max=max(array))


if __name__ == '__main__':
    date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())

    humidities = []
    temperatures = []
    for _ in range(MEASUREMENTS_COUNT):
        humidity, temperature = Adafruit_DHT.read_retry(SENSOR, GPIO)
        humidities.append(humidity)
        temperatures.append(temperature)

    with open("MainLog.txt", "a") as file:
        file.write("{date}: {th} | {tt}\n".format(date=date, th=get_stats(humidities), tt=get_stats(temperatures)))


By the way, I've done something similar, but using the Particle Photon and both DHT11 and BMP180, getting the average values from both sensors - I was surprised how different the values from these sensors were (may be I did something wrong there).



I was also thinking about improving the way stats are formed and using a namedtuple for it:

from collections import namedtuple

Stats = namedtuple("Stats", ["average", "min", "max"])


Then, the get_stats could be:

def get_stats(measurements):
    return Stats(average=sum(measurements) / float(len(measurements)),
                 min=min(measurements),
                 max=max(measurements))


which will change the way we output to the file:

message_template = "{date}: {th.average}, {th.min}, {th.max} | {tt.average}, {tt.min}, {tt.max}\n"
with open("MainLog.txt", "a") as file:
    file.write(message_template.format(date=date, th=get_stats(humidities), tt=get_stats(temperatures)))


This looks a little bit more pythonic - I like the way we construct a message in a single place and keep the stats in a more cleaner manner.