Avoid to stop on first PDF file?

Avoid to stop on first PDF file?
python
Ethan Jackson

When I use memory_graph by render(), I can get two image files correctly: 'mutable1.png', 'mutable2.png'

import memory_graph as mg a = [4, 3, 2] b = a mg.render(locals(), 'mutable1.png') b += [1] mg.render(locals(), 'mutable2.png')

but when I use show(), PDF viewer is stopping at first PDF file:

import memory_graph as mg a = [4, 3, 2] b = a mg.show(locals()) b += [1] mg.show(locals())

How can I avoid to stop on first PDF file?

Answer

I tested it on Linux Mint and normally it shows me only last file. Probably it open first but next it open second file in the same viewer and it replaces previous file so fast so so I can't even see it.

But if I add differn names for file then I can see both

import memory_graph as mg a = [4, 3, 2] b = a mg.show(locals(), outfile="file1.pdf") b += [1] mg.show(locals(), outfile="file2.pdf")

Source code suggests that show() uses render() to create both files with the same names and probably viewer simply replaces content when files have the same name.

Related Articles