Mercurial > repos > fubar > jbrowse2
diff foo @ 131:69c6ea16c148 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
author | fubar |
---|---|
date | Sat, 12 Oct 2024 23:11:22 +0000 |
parents | 49f3d3878413 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/foo Sat Oct 12 23:11:22 2024 +0000 @@ -0,0 +1,7 @@ +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))