Need help to locate subpackages
Hi there, 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? Many thanks, Will -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi Will 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. https://graph-tool.skewed.de/static/doc/index.html https://graph-tool.skewed.de/static/doc/quickstart.html https://graph-tool.skewed.de/static/doc/topology.html https://graph-tool.skewed.de/static/doc/draw.html 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 ;) Have fun ;) Chongee On Wed, Sep 7, 2016 at 11:16 AM, wish18master <siwei.bai@tum.de> wrote:
Hi there,
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?
Many thanks, Will
-- View this message in context: http://main-discussion-list- for-the-graph-tool-project.982480.n3.nabble.com/Need- help-to-locate-subpackages-tp4026716.html Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com. _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool
Found it! 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. -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Look at: https://graph-tool.skewed.de/static/doc/quickstart.html First line: from graph_tool.all import * It's good to walk through at least over the basics ;) Chongee On Thu, Sep 8, 2016 at 9:59 AM, wish18master <siwei.bai@tum.de> wrote:
Found it! 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.
-- View this message in context: http://main-discussion-list- for-the-graph-tool-project.982480.n3.nabble.com/Need- help-to-locate-subpackages-tp4026716p4026718.html Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com. _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool
Hi :) 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. Cheers, Felix -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi Felix, 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. :p Cheers, Will
On 10 Sep 2016, at 12:43, flxvctr [via Main discussion list for the graph-tool project] <ml-node+s982480n4026720h70@n3.nabble.com> wrote:
Hi :)
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.
Cheers,
Felix
If you reply to this email, your message will be added to the discussion below: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from Need help to locate subpackages, click here. NAML
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
participants (3)
-
flxvctr -
Matyas, Csongor -
wish18master