On Tue, May 14, 2013 at 8:53 PM, Hartmut Goebel <[email protected]>wrote:
> Am 14.05.2013 13:36, schrieb Laurence Anthony: > > It might work. I just don't understand the docs! :-). If I call > Tree(mydir), what exactly is returned. A list? A string? An iterator? > > > Yes, it's a bit short :-) Thanks to Nat Picker there is a better > description available now: > > <https://rawgithub.com/pyinstaller/pyinstaller/develop/doc/Manual.html#the-tree-class><https://rawgithub.com/pyinstaller/pyinstaller/develop/doc/Manual.html#the-tree-class> > > Is this understandable for you? (Otherwise we should again improve it) > > Wow... I just read through the entire manual. It is so much clearer. Nat Picker has done a great job. Unfortunately, the Tree section is still a bit cryptic. Here are the relevant bits: #### TOC Class (Table of Contents) ... Basically a TOC object contains a list of tuples of the form (name,path,typecode) .... The Tree Class The Tree class is a way of creating a TOC that describes some or all of the files within a directory: Tree(root, prefix=run-time-folder, excludes=match) ### So, if Tree is creating a TOC, how does root, prefix, (and excludes) relate to (name, path, typecode) of TOC. I guess <prefix> become the first part of <name> but it is not clear how the <root> path gets combined with <name>. Then, clearly <path> and <root> are related, but how is not clear either. The big problem is <typecode>. What typecode does the Tree command create. Is it always <DATA>? Perhaps a simple example using a bundle folder (e.g. dist) and a source folder (e.g. c:/testfolder) would be good. See my earlier example: c:/mydir c:/mydir/text1.txt c:/mydir/text2.txt So, how do I get c:/mydir into the dist folder? Is it simply for a one-dir: collect = COLLECT(a.binaries + Tree('c:/mydir'), ... And for a one-file bundle: exe = EXE(..., a.binaries + + Tree('c:/mydir'), .... Or: collect = COLLECT(a.binaries + Tree('c:/mydir', 'mydir'), ... exe = EXE(..., a.binaries + + Tree('c:/mydir', 'mydir'), .... or something else? An example explaining this would be really useful. Laurence. -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
