I am new to the graph-tool module. I downloaded the precomplied module from
repository and import graph_tool on python. Everything worked out fine,
except that I can't use any of the subpackages listed on the documentation
(because they were not there). I would really like to use the 'draw' and
'topology' subpackages. Can be someone tell me where to download them or how
to import them?
I don't think that there are any sub packages. Everything is one package
here. A good way to start is to try the examples from the documentation.
There are lots of examples there for drawing and for other stuff too. I
found it very helpful.
If you have a specific problem, we will need some information. The exact
error message, the exact version of graph-tools, python, operating system
that you are using, the code that you wrote and explanation of what do you
expect from that code.
If you're new to python but you know some basic programming take a look at
how classes work.
If you have any problems feel free to ask
attachment.html (2.83 KB)
It turned out I have to import the subpackages first before I want to use
them. As first I was trying to use gt.topology but it told me there wasn't
such an attribute.
from graph_tool.all import *
It's good to walk through at least over the basics
attachment.html (1.86 KB)
Maybe this answer is more helpful, as I can understand that `from
graph-tool.all import *` might clutter your namespace, especially if you're
using other graph analysis packages in parallel (it's also not necessarily
considered good practice to do so.)
I figured that
import graph-tool.all as gt
should give you the behaviour you were expecting (understandably if you look
at a lot of examples in the docs). At least it does so far for me.
Many thanks for your reply. Right now I'm just using "import graph_tool.topology as topo", so that I don't have to type too much in my codes.
attachment.html (3 KB)