Mercurial > repos > fubar > jbrowse2
comparison foo @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
| author | fubar |
|---|---|
| date | Sat, 05 Oct 2024 23:58:05 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 124:137e08517410 | 125:49f3d3878413 |
|---|---|
| 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)) |
