def cmd_PUT(self, rest):
        """
        Do an upload request for a single local file or a globing expression.

        @param rest: Requested command line for the PUT command.
        @type rest: L{str}

        @return: A deferred which fires with L{None} when transfer is done.
        @rtype: L{defer.Deferred}
        """
        local, rest = self._getFilename(rest)

        # FIXME: https://twistedmatrix.com/trac/ticket/7241
        # Use a better check for globbing expression.
        if '*' in local or '?' in local:
            if rest:
                remote, rest = self._getFilename(rest)
                remote = os.path.join(self.currentDirectory, remote)
            else:
                remote = ''

            files = glob.glob(local)
            return self._putMultipleFiles(files, remote)

        else:
            if rest:
                remote, rest = self._getFilename(rest)
            else:
                remote = os.path.split(local)[1]
            return self._putSingleFile(local, remote)

        Do an upload request for a single local file or a globing expression.

        @param rest: Requested command line for the PUT command.
        @type rest: L{str}

        @return: A deferred which fires with L{None} when transfer is done.
        @rtype: L{defer.Deferred}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/scripts/cftp.py