This question follows from another question - How To Retrive A Batch Of Transmembrane Domains From Uniprot? that asks about how to retrieve transmembrane (TM) domains from uniprot.
The top answer in that question mentions that the UniProt XML format can be used to retrieve a fasta sequence of each TM region.
filenames = ["O43561.xml", "P08195.xml", "Q58CT8.xml"] input_format = "uniprot-xml" feature_type = "transmembrane region" output_filename = "uniprot_tm.fasta"
How can this XML snippet be used as part of a python script (without using biopython modules - How To Retrive A Batch Of Transmembrane Domains From Uniprot?, or Java modules - How To Retrieve Human Proteins Sequence Containing A Given Domain as they have already been solved) to download fasta formatted files from uniprot?