Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::EUtils::ThinClient::ThinClient::_fixup_query (   self,
) [private]

Internal function to add and remove fields from a query

Definition at line 607 of file ThinClient.py.

00607                                  :
        """Internal function to add and remove fields from a query"""
        q = query.copy()

        # Set the 'tool' and 'email' fields
        q["tool"] = self.tool
        q["email"] = self.email

        # Kinda cheesy -- shouldn't really do this here.
        # If 'usehistory' is true, use the value of 'Y' instead.
        # Otherwise, don't use history
        if "usehistory" in q:
            if q["usehistory"]:
                q["usehistory"] = "y"
                q["usehistory"] = None

        # This will also remove the history, email, etc. fields
        # if they are set to None.
        for k, v in q.items():
            if v is None:
                del q[k]

        # Convert the query into the form needed for a GET.
        return urllib.urlencode(q)

    def _get(self, program, query):

Generated by  Doxygen 1.6.0   Back to index