aditya shukla wrote:

Hello folks , i have a .nwk file.I want to parser the tree from that file.I found this python parser for newick trees.
http://www.daimi.au.dk/~mailund/newick.html

But i don't understand the usage properly.What i wanna do is if i have a file in the location c:\\files\\file1.nwk , then i wanna parse the trees in that file.

judging from the docs, you should be able to do e.g.

  from newick import parse_tree

  file = open("c:\\files\\file1.nwk")
  text = file.read()

  print parse_tree(text)

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to