Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify ElementTree imports/usage #9

Merged
merged 1 commit into from May 15, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions svg_util/change_color.py
@@ -1,8 +1,7 @@
from xml.etree.ElementTree import ElementTree as ET
import xml.etree.ElementTree as ET
from svg_util.etree import find, findall
from svg_util.css import css_dict, css_string, set_property, get_property
tree = ET()
tree.parse("./tests/addabove/A.svg")
tree = ET.parse("./tests/addabove/A.svg")
root = tree.getroot()
rect = find(root,"g/rect")
set_property(rect,'fill',"#0000ff")
Expand Down
5 changes: 2 additions & 3 deletions svg_util/double_elem.py
@@ -1,9 +1,8 @@
from xml.etree.ElementTree import ElementTree as ET
import xml.etree.ElementTree as ET
from svg_util.etree import find, findall
from svg_util.css import css_dict, css_string, set_property, get_property
from copy import deepcopy
tree = ET()
tree.parse("./tests/addabove/A.svg")
tree = ET.parse("./tests/addabove/A.svg")
root = tree.getroot()
g = find(root,"g")
rect = find(root,"g/rect")
Expand Down