Re: python, I'm being dumb... again!

2019-05-13 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: python, I'm being dumb... again! @5, that's odd -- it always seemed like os.walk was non-recursive to me. Maybe it was the examples I was looking at. URL: https://forum.audiogames.net/post/433454/#p433454 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin

Re: python, I'm being dumb... again!

2019-05-13 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: python, I'm being dumb... again! @5, that's odd since all the "recursive directory iterators" in Python always recursively called themselves with os.walk to "simulate recursion.". I wish that function was more obvious in what it did; at least C++ has recursive_direc

Re: python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : Sam_Tupy via Audiogames-reflector
Re: python, I'm being dumb... again! @Ethin os.walk is indeed recursive. @1, basically when you loop through output from os.walk, you are getting a list with 3 items in it. This is usually represented by something like for root, dirs, files in os.walk(directory). However you can also

Re: python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : Sam_Tupy via Audiogames-reflector
Re: python, I'm being dumb... again! @Ethin os.walk is indeed recursive. @1, basically when you loop through output from os.walk, you are getting a list with 3 items in it. This is usually represented by something like for root, dirs, files in os.walk(directory). However you can also

Re: python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: python, I'm being dumb... again! No, it won't. Os.walk doesn't do that either. URL: https://forum.audiogames.net/post/433251/#p433251 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo

Re: python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
Re: python, I'm being dumb... again! Thanks for the quick reply. I looked at os.scandir and it only seems to loop through the folders and work on the root of the folder. So if I have my documents folder and I use os.scandir on it, if I have any folders within documents it won't show

Re: python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: python, I'm being dumb... again! Root is the directory your walking. drs is the directories within that folder. Files are the actual files in that folder. It is possible using the drs return value to create a recursive directory scanner. As a side note, I'd recommend using os.scandir

python, I'm being dumb... again!

2019-05-12 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
python, I'm being dumb... again! So, for the life of me, I can't figure out what does the os.walk(directory) do. I know it scans the files in some way, but I just don't understand... how?I saw a loop that had 3 arguments when using os.walk. Something like this.for root, drs, files