Mercurial > repos > fubar > jbrowse2
comparison 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 |
comparison
equal
deleted
inserted
replaced
130:e188a9d25ed2 | 131:69c6ea16c148 |
---|---|
1 import xml.etree.ElementTree as ET | |
2 import string | |
3 removeMe = string.punctuation.replace('.', ' ').replace('/', '').replace('-', '') | |
4 nopunct = str.maketrans(dict.fromkeys(removeMe)) | |
5 xmlstr = '<foo><bar key="!::{}////foo \\~~~~ bar">text</bar></foo>' | |
6 root = ET.fromstring(xmlstr) | |
7 print(root[0].attrib['key'],'=',root[0].attrib['key'].translate(nopunct)) |