On 6 May 2011 10:31, Jason Heeris <jason.hee...@gmail.com> wrote:
> Is there a canonical way to convert between these two formats? I don't
> want to just use a simple line of code that turns out to be wrong at
> some point in the future...

a) why do you want to convert between the two? In my experience, when
I start thinking about equating or manipulating paths, it usually
means I'm actually trying to test something about the underlying model
and should be converting to a TreeIter instead.

b) If you're sure you need to normalise the path and that the path you
start with corresponds to a position in the model, you can use things
like the get_iter(path) and get_string_from_iter(iter) dance to get
always get a string, otherwise, since the possible formats of a path
are well defined (see the documentation for gtk.TreeView), you can
easily write the trivial custom conversion function.

-- 
Neil Muller
drnlmul...@gmail.com

I've got a gmail account. Why haven't I become cool?
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to