Ok, after the discussion on the chat, here is the solution (thanks for your help everyone): This script opens a Leo file, and traverses its nodes.
exists=0 for com in g.app.commanders(): if 'I_Programming.leo' in com.fileName(): dc = com exists=1 break if not exists: c2 = g.openWithFileName('D:/Dropbox/MY LEO FILES/LEO FILES/I_Programming/I_Programming.leo',old_c=c) for com in g.app.commanders(): if 'I_Programming.leo' in com.fileName(): dc = com exists=1 break for child in dc.all_unique_positions(): g.es(child.h) -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.