Mercurial > repos > fubar > jbrowse2
view foo @ 129:d08080933718 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6d8a6a308c219c112dbfc09fe48ad462746d6fb0
author | fubar |
---|---|
date | Mon, 07 Oct 2024 08:55:19 +0000 |
parents | 49f3d3878413 |
children |
line wrap: on
line source
import xml.etree.ElementTree as ET import string removeMe = string.punctuation.replace('.', ' ').replace('/', '').replace('-', '') nopunct = str.maketrans(dict.fromkeys(removeMe)) xmlstr = '<foo><bar key="!::{}////foo \\~~~~ bar">text</bar></foo>' root = ET.fromstring(xmlstr) print(root[0].attrib['key'],'=',root[0].attrib['key'].translate(nopunct))