Hi again,

> def extra_datas(mycwd,mydir):
>
>
> This looks like you are reimplementing os.walk(). And to be frank: this is
> ugly, ugly code (I'm glad that it's not yours, so I can say this :-)
>
>
Yes, it's ugly and it's not mine!! :-)  But, I can confirm that it does
work and it works well. I could bundle the entire R stats library and it
works perfectly. I'll now tidy up the code, but I wanted to give credit to
the person who originally suggested the approach.

>
> that TREE can be used to walk through a directory. However, I couldn't get
> this to work and had use the above script to walk through the directory
> myself.
>
>
> Well, the function is called "Tree", not "TREE", you can find the
> documentation here:
>
> <http://www.pyinstaller.org/export/v2.0/project/doc/Manual.html?format=raw#tree><http://www.pyinstaller.org/export/v2.0/project/doc/Manual.html?format=raw#tree>
>
> What is your exact problem with it? (I have not used it yet, but it looks
> as if it would solve your problem. Thanks for ponting to it :-)
>

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?
If mydir is like the following:

c:/mydir
c:/mydir/text1.txt
c:/mydir/text2.txt

for the a.datas addition approach to work, I need the following structure:

a.datas += [ ('/mydir/text1.txt', 'c:/mydir/text1.txt', DATA),
('/mydir/text2.txt', 'c:/mydir/text2.txt', DATA) ]

So if I call Tree('c:/mydir'), what is returned?

I know that I should just try this myself. But, my hack already works and
I've already spent hours on this! Any quick pointers would be great.

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.


Reply via email to