J
J
Jan2020-06-27 00:04:59
Python
Jan, 2020-06-27 00:04:59

Pfft... How to manage SVG document from Python code?

Put me on the right path, please.

I have a schematic SVG file with about 300 elements.
The python code is ready, which generates a set of instructions: which elements to show, which to hide.
Now I need to somehow make friends of these parts, and I'm stuck.

All you need is for the SVG with the settings to be thrown out for download - that's it!

Please, tell me the simplest solution to this problem.

Thanks everyone for any input!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2020-06-27
@JanJarius

You can try Flask
https://stackoverflow.com/a/24578372

import os

from flask import Flask
from flask import send_from_directory

app = Flask(__name__)


@app.route('/<path:filename>', methods=['GET', 'POST'])
def download(filename):
    uploads = os.path.join(app.root_path)
    return send_from_directory(directory=uploads, filename=filename)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question