(self, login=None)
return path
DEPRECATED: use create_resource_paths() or get_resource_path()
           Create the resource path
DEPRECATED: use create_resource_paths() or get_resource_path()
           Create the resource path
DEPRECATED : use create_resource_paths () or get_resource_path () Create the resource path
def create_resource_path(self, login=None):
        '''DEPRECATED: use create_resource_paths() or get_resource_path()
           Create the resource path'''
        # get the current user
        if not login:
            login = getpass.getuser()
        filename = "%s.tacticrc" % login

        # first check home directory
        dir = self.get_home_dir()
        is_dir_writeable = os.access(dir, os.W_OK) and os.path.isdir(dir)
        
        # if the home directory is not existent or writable,
        # use the temp directory
        if not os.path.exists(dir) or not is_dir_writeable:
            if os.name == "nt":
                dir = "C:/sthpw/etc"
            else:
                dir = "/tmp/sthpw/etc"
            if not os.path.exists(dir):
                os.makedirs(dir)
        else:
            dir = "%s/.tactic/etc" % dir
            if not os.path.exists(dir):
                os.makedirs(dir)

            # if an old resource path does exist, then remove it
            if os.name == "nt":
                old_dir = "C:/sthpw/etc"
            else:
                old_dir = "/tmp/sthpw/etc"

            old_path = "%s/%s" % (old_dir, filename)
            if os.path.exists(old_path):
                os.unlink(old_path)
                print("Removing deprectated resource file [%s]" % old_path)


        path = "%s/%s" % (dir,filename)
        return path
def create_resource_path ( self , login = None ) : # get the current user if not login : login = getpass . getuser ( ) filename = "%s.tacticrc" % login # first check home directory dir = self . get_home_dir ( ) is_dir_writeable = os . access ( dir , os . W_OK ) and os . path . isdir ( dir ) # if the home directory is not existent or writable, # use the temp directory if not os . path . exists ( dir ) or not is_dir_writeable : if os . name == "nt" : dir = "C:/sthpw/etc" else : dir = "/tmp/sthpw/etc" if not os . path . exists ( dir ) : os . makedirs ( dir ) else : dir = "%s/.tactic/etc" % dir if not os . path . exists ( dir ) : os . makedirs ( dir ) # if an old resource path does exist, then remove it if os . name == "nt" : old_dir = "C:/sthpw/etc" else : old_dir = "/tmp/sthpw/etc" old_path = "%s/%s" % ( old_dir , filename ) if os . path . exists ( old_path ) : os . unlink ( old_path ) print ( "Removing deprectated resource file [%s]" % old_path ) path = "%s/%s" % ( dir , filename ) return path