Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # js_text_angle.py
- import tempfile
- import webbrowser
- import os
- js_data = '''<!DOCTYPE html>
- <html>
- <body>
- <svg height="60" width="200">
- <text x="0" y="15" fill="red" transform="rotate(30 20,40)">I love SVG</text>
- Sorry, your browser does not support inline SVG.
- </svg>
- </body>
- </html>'''
- chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
- tf = tempfile.mktemp(".html", "JSdemo_")
- print tf
- with open(tf, 'w') as temp:
- temp.write(js_data)
- webbrowser.get(chrome_path).open(tf)
- os.remove(tf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement