How to use the astroquery.utils.tap.xmlparser.utils.util_create_string_from_buffer function in astroquery

To help you get started, we’ve selected a few astroquery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github astropy / astroquery / astroquery / utils / tap / xmlparser / sharedItemsSaxParser.py View on Github external
def __create_string_from_buffer(self):
        return Utils.util_create_string_from_buffer(self.__charBuffer)
github astropy / astroquery / astroquery / utils / tap / xmlparser / jobSaxParser.py View on Github external
def __create_string_from_buffer(self):
        return Utils.util_create_string_from_buffer(self.__charBuffer)
github astropy / astroquery / astroquery / utils / tap / core.py View on Github external
port = 80

        if itemsSize == 1:
            serverContext = ""
            tapContext = ""
        elif itemsSize == 2:
            serverContext = "/"+items[1]
            tapContext = ""
        elif itemsSize == 3:
            serverContext = "/"+items[1]
            tapContext = "/"+items[2]
        else:
            data = []
            for i in range(1, itemsSize-1):
                data.append("/"+items[i])
            serverContext = utils.util_create_string_from_buffer(data)
            tapContext = "/"+items[itemsSize-1]
        if verbose:
            print("protocol: '%s'" % protocol)
            print("host: '%s'" % host)
            print("port: '%d'" % port)
            print("server context: '%s'" % serverContext)
            print("tap context: '%s'" % tapContext)
        return protocol, host, port, serverContext, tapContext
github astropy / astroquery / astroquery / utils / tap / xmlparser / groupSaxParser.py View on Github external
def __create_string_from_buffer(self):
        return Utils.util_create_string_from_buffer(self.__charBuffer)
github astropy / astroquery / astroquery / utils / tap / xmlparser / jobListSaxParser.py View on Github external
def __create_string_from_buffer(self):
        return Utils.util_create_string_from_buffer(self.__charBuffer)
github astropy / astroquery / astroquery / utils / tap / conn / tapconn.py View on Github external
multiparItems.append(CRLF)
            multiparItems.append(fields[key]+CRLF)
        for (key, filename, value) in files:
            multiparItems.append('--' + boundary + CRLF)
            multiparItems.append(
                'Content-Disposition: form-data; name="%s"; filename="%s"%s' %
                (key, filename, CRLF))
            multiparItems.append(
                'Content-Type: %s%s' %
                (mimetypes.guess_extension(filename), CRLF))
            multiparItems.append(CRLF)
            multiparItems.append(value)
            multiparItems.append(CRLF)
        multiparItems.append('--' + boundary + '--' + CRLF)
        multiparItems.append(CRLF)
        body = utils.util_create_string_from_buffer(multiparItems)
        contentType = 'multipart/form-data; boundary=%s' % boundary
        return contentType, body