<div dir="ltr">hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 14, 2017 at 3:16 PM, Mini Trader <span dir="ltr"><<a href="mailto:miniflowtrader@gmail.com" target="_blank">miniflowtrader@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well the author at my request was able to remove the call to os.getcwd() which allows the program to operate.<div><br></div><div><br></div><div>If anyone wants to tinker here is an example that will likely break on someones system.  I don't know if this is an LX bug, libc bug, python bug etc.</div><div><br></div><div><span class=""><div># read a directory, stat all files</div><div><br></div><div>import os</div><div>import sys</div><div>from stat import *</div><div><br></div></span><div>def chdir(d):</div><div>    global cwdlist</div><div><br></div><div>    if d != '.':</div><div>        os.chdir(d)</div><div>        if d == '..':</div><div>            cwdlist.pop()</div><div>        else:</div><div>            cwdlist.append(d)</div><div>        print repr('/'.join(cwdlist))</div><div>        # Comment the line below to allow things to run</div><div>        os.getcwd()</div><div><br></div><div>def walk(d):</div><div>    chdir(d)</div><span class=""><div>    dirlist = os.listdir('.')</div><div>    dirlist.sort()</div><div>    for f in dirlist:</div><div>        try:</div><div>            s = os.lstat(f)</div><div>            if S_ISDIR(s.st_mode):</div><div>                walk(f)</div><div>        except OSError, err:</div></span><div>            print err</div><div>    chdir('..')</div><span class=""><div><br></div><div>if len(sys.argv) != 2:</div><div>    print 'need 1 arg, directory to scan'</div><div><br></div></span><div>os.chdir(sys.argv[1])</div><div>cwd = os.getcwd()</div><div>cwdlist = cwd.split('/')</div><div><br></div><div>walk('.')</div></div><div><br></div></div></blockquote></div><br></div><div class="gmail_extra">runs fine in a centos 6.8 container, no problem.<br><br></div><div class="gmail_extra">I even have a couple of mount points with several thousand files and it walks everything without a hitch.<br><br>-- <br></div><div class="gmail_extra">regards,<br></div><div class="gmail_extra">Natxo<br></div><div class="gmail_extra"><br><br></div></div>