Commit 93a9ce63 authored by grisel-davy's avatar grisel-davy
Browse files

Fichier dot temporaire

parent 8cc1841f
......@@ -48,7 +48,7 @@ from django.template import Context, Template, loader
from django.db.models.signals import post_save
from django.dispatch import receiver
import pprint
import tempfile
from users.views import form
from re2o.utils import re2o_paginator, SortTable
......@@ -1037,11 +1037,12 @@ def make_machine_graph():
dot_data=generate_dot(dico,'topologie/') # generate the dot file
fichier = open(MEDIA_ROOT + "/images/","w", encoding='utf-8')
f = tempfile.NamedTemporaryFile(mode='w+', encoding='utf-8', delete=False) # Create a temporary file to store the dot data
with f:
unflatten = Popen( # unflatten the graph to make it look better
["unflatten","-l", "3", MEDIA_ROOT + "/images/"],
["unflatten","-l", "3",],
image = Popen( # pipe the result of the first command into the second
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment