(self)
return rdirs
Compile a prioritised list of all dirs
Compile a prioritised list of all dirs
Compile a prioritised list of all dirs
def get_dirs(self):
        """Compile a prioritised list of all dirs"""

        dirs=[]
        keys=['HOME','HOMEPATH','HOMEDRIVE']
        import os, sys
        for key in keys:
            if key in os.environ:
                dirs.append(os.environ[key])

        if 'HOMEPATH' in os.environ:
            # windows
            dirs.append(os.environ['HOMEPATH'])
        # Drives
        possible_dirs=["C:\\","D:\\","/"]
        for pdir in possible_dirs:
            if os.path.isdir(pdir):
                dirs.append(pdir)

        rdirs=[]
        for dirname in dirs:
            if os.path.isdir(dirname):
                rdirs.append(dirname)
        return rdirs
def get_dirs ( self ) : dirs = [ ] keys = [ 'HOME' , 'HOMEPATH' , 'HOMEDRIVE' ] import os , sys for key in keys : if key in os . environ : dirs . append ( os . environ [ key ] ) if 'HOMEPATH' in os . environ : # windows dirs . append ( os . environ [ 'HOMEPATH' ] ) # Drives possible_dirs = [ "C:\\" , "D:\\" , "/" ] for pdir in possible_dirs : if os . path . isdir ( pdir ) : dirs . append ( pdir ) rdirs = [ ] for dirname in dirs : if os . path . isdir ( dirname ) : rdirs . append ( dirname ) return rdirs