Directory operations Do you have any suggestions about how to make this code faster/better? Maybe suggest new features or better comments/docstrings?     

from time import time, ctime, sleep
from random import choice, uniform
from glob import glob
import os

# Gets current working directory 
DIRECTORY_NAME = os.getcwd()

def load():
    """Prints loading messages"""
    os.system("clear")
    MESSAGES = ["Deleting hard drive...", "Reticulating Spines...", "Fetching Your Credit Card Number...", "Hacking your computer..."]
    print(choice(MESSAGES))
    sleep(uniform(1, 5))
    os.system("clear")

def print_dir(dirname):
    """Prints the current directory"""
    print("Directory: %s" % dirname)
    print("-"*80)

def number_of_files(dirname):
    """Finds the number of files in the directory using glob"""
    num_of_files = len(glob("*"))
    print(num_of_files, "files")
    print("-"*80)

def last_access(dirname):
    """Prints a ctime representation of the last access to a file"""
    print("Last Access: ")
    print(ctime(os.path.getatime(dirname)))
    print("-"*80)

def last_change(dirname):
    """Prints a ctime representation of the last change to a file"""
    print("Last Change: ")
    print(ctime(os.path.getmtime(dirname)))
    print("-"*80)

def size_of_dir(dirname):
    """Walks through the directory, getting the cumulative size of the directory"""
    sum = 0
    for file in os.listdir(dirname):
        sum += os.path.getsize(file)
    print("Size of directory: ")
    print(sum, "bytes")
    print(sum/1000, "kilobytes")
    print(sum/1000000, "megabytes")
    print(sum/1000000000, "gigabytes")
    print("-"*80)
    input("Press ENTER to view all files and sizes")

def files_in_dir(dirname):
    """Walks through the directory, printing the name of the file as well as its size"""
    print("Files in directory: %s" % dirname)
    for file in os.listdir(dirname):
        print("{0} =&gt; {1} bytes".format(file, os.path.getsize(file)))

load()
print_dir(DIRECTORY_NAME)
number_of_files(DIRECTORY_NAME)
last_access(DIRECTORY_NAME)
last_change(DIRECTORY_NAME)
size_of_dir(DIRECTORY_NAME)
files_in_dir(DIRECTORY_NAME)
from time import time, ctime, sleep
from random import choice, uniform
from glob import glob
import os

# Gets current working directory 
DIRECTORY_NAME = os.getcwd()


Given that its global and all caps, I'd expect it to be a constant. But it's not really a constant.

def load():
    """Prints loading messages"""
    os.system("clear")


This isn't portable, you may want to check out: https://stackoverflow.com/questions/2084508/clear-terminal-in-python

    MESSAGES = ["Deleting hard drive...", "Reticulating Spines...", "Fetching Your Credit Card Number...", "Hacking your computer..."]


I'd put this as a global outside of the function.

    print(choice(MESSAGES))
    sleep(uniform(1, 5))
    os.system("clear")

def print_dir(dirname):
    """Prints the current directory"""


It prints the directory passed in, not the current directory

    print("Directory: %s" % dirname)
    print("-"*80)


You do this several times, perhaps write a function for it

def number_of_files(dirname):
    """Finds the number of files in the directory using glob"""


I wouldn't put details like how it counts the files in the docstring

    num_of_files = len(glob("*"))
    print(num_of_files, "files")
    print("-"*80)

def last_access(dirname):
    """Prints a ctime representation of the last access to a file"""
    print("Last Access: ")
    print(ctime(os.path.getatime(dirname)))
    print("-"*80)

def last_change(dirname):
    """Prints a ctime representation of the last change to a file"""
    print("Last Change: ")
    print(ctime(os.path.getmtime(dirname)))
    print("-"*80)


These two functions are quite similar. Considering combining them, passing the os.path.xtime function as a parameter

def size_of_dir(dirname):
    """Walks through the directory, getting the cumulative size of the directory"""
    sum = 0


sum isn't a great choice because there is a builtin python function by that name

    for file in os.listdir(dirname):
        sum += os.path.getsize(file)


I'd use directory_size = sum(map(os.path.getsize, os.listdir(dirname))

    print("Size of directory: ")
    print(sum, "bytes")
    print(sum/1000, "kilobytes")
    print(sum/1000000, "megabytes")
    print(sum/1000000000, "gigabytes")
    print("-"*80)
    input("Press ENTER to view all files and sizes")


As palacsint mentioned, this should really be in the next function, or perhaps in your main function.

def files_in_dir(dirname):
    """Walks through the directory, printing the name of the file as well as its size"""
    print("Files in directory: %s" % dirname)
    for file in os.listdir(dirname):


file is builtin class in python, I'd avoid using it as a local variable name

        print("{0} =&gt; {1} bytes".format(file, os.path.getsize(file)))


load()
print_dir(DIRECTORY_NAME)
number_of_files(DIRECTORY_NAME)
last_access(DIRECTORY_NAME)
last_change(DIRECTORY_NAME)
size_of_dir(DIRECTORY_NAME)
files_in_dir(DIRECTORY_NAME)


I'd suggesting putting all of these in a main() function.