[IPOL discuss] various questions about python demos

Juan Cardelino juan.cardelino at gmail.com
Mon Nov 28 14:27:48 CET 2011


Dear all,
        I have a couple of questions about the demo system, because
one of my demos is somehow different that the average.

1) I have  code which needs a ./configure to generate its makefile.
Ideally, I would like to do the following:
build.run("./configure"); <- the problem here is that this needs to be
run in the src dir but the demo code runs outside it.
build.run("make -C src");
Is there a way to change the working dir in python? Because as far as
I know, there is no way to change the working directory in a
./configure script
I also tried build.run("cd src ; ./configure "); and it didn't work.
Also tried to escape the semilcolon, but without any luck.
At the moment, I use a pre-generated makefile, but it think this it
not the best idea, because I have to hard-wire the path to the
libraries, o assume they are in an standard path.

2) Regarding the same topic, it would be useful to run cmake in the
same way (this is related to a recent Nicolas question).
So far I had no luck with this, sorry Nicolas.

3) I'm working in matching of graphs and trees, which in turn come
from images. When I try to illustrate this in a demo, I do the
following:

a) im1->tree1
b) im2->tree2
c) (im1,im2,tree1,tree2)->G (a graf)
d) G->matching

In this case the demo fits exactly in the IPOL's demo model: two input
images, one list of nodes as output (then passed to a graph renderer
to show it as an image)
I'm also matching RAGs, for which I do the following:

a) im1->tree1
b) im2->tree2
c) (im1,im2,tree1,tree2)->G (a graf)
d) G->matching

But in general I think it will be very helpful to have a standalone
demo which receives directly a couple of graphs and outputs the
isomorphism. So I need to use a couple of input formats for the
graphs. If the graph is expressed as an adjacency matrix, the input
will be a text file with the matrix (in a sort of csv format), and in
the case of a adjacency list, it will be a list of pairs of connected
nodes (again in a text file).
My problem with this is the input. Currently the input system is
tailored to images, so it will take some coding to adapt it to another
kind of input, for instance to  upload a text file, rename it, etc.

Have you guys tried to do something similar?
Thanks in advance.
Best regards,
                   Juan


More information about the discuss mailing list