Dir.py


# Written by Acheev Bhagat
# Provides functions on directories and files
import os
from os import path
from os import remove
from os import walk
from os.path import isdir
from os.path import isfile
from os.path import getsize
from os.path import join
import shutil
from shutil import rmtree

class Dir():
    def dirlis():
        a = raw_input()
        for dirname, dirnames, filenames in os.walk(a):
            for subdirname in dirnames:
                print os.path.join(dirname, subdirname)
            for filename in filenames:
                print os.path.join(dirname, filename)                
    def dirdel():
        shutil.rmtree()
    #def safedirdel():
        
    def filedel():
        os.remove()
    #def safefiledel():
    def size():
        os.path.getsize()
    def isdir():
        os.path.isdir()
    def isfile():
        os.path.isdir()
#    b = 1
#    while b == 1:
#        run = raw_input('Run a function(dirlist(), dirdel(), safedirdel(), filedel(), safefiledel(), size(), isdir(), isfile()): ')
#        if run == "dirlist()":
#            dirlist()
#        elif run == "dirdel()":
#            dirdel()
#        elif run == "safedirdel()":
#            safedirdel()
#        elif run == "filedel()":
#            filedel()
#        elif run == "safefiledel()":
#            safefiledel()
#        elif run == "size()":
#            size()
#        elif run == "isdir()":
#            isdir()
#        elif run == "isfile()":
#            isfile()


This file was originally intended to be a module but did not work as intended.
The files functions are to perform basic operations on files and directories.