arekana
Member-
Posts
15 -
Joined
-
Last visited
Awards
This user doesn't have any awards
Profile Information
-
Gender
Male
-
Location
Rotterdam, The Netherlands.
-
Occupation
Lead Software Engineer (Python, C++, PHP)
arekana's Achievements
-
After trying it my self for subdir, files in folder_structure_intact_glob(os.path.realpath('./test')): print(subdir) print(files) It seem to work, what version of python are you using ? Can you dump self.options.data_files to see if the array is still intact. My only other guess could be that it might be windows (as mentioned don't know anything about python on windows or windows in general).
-
After taking a better look at your requested array structure I wrote a small script that will give the output you desire. (The code is not the most optimal and speedy but wrote it for clarity, more then anything else. so you can write your own) import glob import os.path def directory_listing_recursive(path): files = [] for item in glob.glob(path + '/*'): if os.path.isdir(item): files.append([item, directory_listing_recursive(item)]) else: files.append(item) return files print(directory_listing_recursive(os.path.realpath('./test'))) Tested with the following folder structure [arekana@arekanapro /var/code/python/playground/recursive]$ ls -lhR total 8 -rw-r--r-- 1 arekana wheel 351B Apr 17 23:31 main.py drwxr-xr-x 4 arekana wheel 136B Apr 17 23:14 test ./test: total 0 drwxr-xr-x 4 arekana wheel 170B Apr 17 23:15 sub1 drwxr-xr-x 2 arekana wheel 102B Apr 17 23:15 sub2 ./test/sub1: total 0 -rw-r--r-- 1 arekana wheel 0B Apr 17 23:15 file1_1 drwxr-xr-x 2 arekana wheel 102B Apr 17 23:14 sub1_1 drwxr-xr-x 2 arekana wheel 102B Apr 17 23:15 sub1_2 ./test/sub1/sub1_1: total 0 -rw-r--r-- 1 arekana wheel 0B Apr 17 23:14 file1_1_1.txt ./test/sub1/sub1_2: total 0 -rw-r--r-- 1 arekana wheel 0B Apr 17 23:15 file1_2_1.txt ./test/sub2: total 0 -rw-r--r-- 1 arekana wheel 0B Apr 17 23:15 file2_1.txt it will give the following output [['/private/var/code/python/playground/recursive/test/sub1', ['/private/var/code/python/playground/recursive/test/sub1/file1_1', ['/private/var/code/python/playground/recursive/test/sub1/sub1_1', ['/private/var/code/python/playground/recursive/test/sub1/sub1_1/file1_1_1.txt']], ['/private/var/code/python/playground/recursive/test/sub1/sub1_2', ['/private/var/code/python/playground/recursive/test/sub1/sub1_2/file1_2_1.txt']]]], ['/private/var/code/python/playground/recursive/test/sub2', ['/private/var/code/python/playground/recursive/test/sub2/file2_1.txt']]] Although if your array structure does not matter to you then I still suggest using glob with the build-in recursive argument to do it for you as it a bit nicer. If you require anymore help do not hesitate to ask.
-
I am not used to python on windows but I would look at the glob library (https://docs.python.org/3/library/glob.html) it has a argument to make it recursive so you dont have to make a recursive function your self. You can ether loop it in a for file in glob('parentFolder/*', recursive=True) to get all the folders and files. or you can get all the files from every sub folder (I also see you want png files so I added that as-well) glob('parentFolder/*/*.{png,txt}') this should give you a nice list of files. can the array be flat or do you want to keep the folder structure intact ? If you need more help let me know your specific case and will write a small script for you to demonstrate.
-
Ok thank you very much for the help. Thanks as-well, very good read. I think I will go for the 702's as its not that big of a price difference and the detachable cable is a feature I do like.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Those AKG K612 Pro's have a very nice price thanks! would these need(or be improved by) a AMP/DAC or is my MBP mini-jack more then enough ?
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Those are pricey, but will try to see if I can demo them somewhere to see if they are worth it. Thanks for the recommendation.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Think so(as I mentioned not really a audiophile) Is there is a good reason against one or the other ?. At the moment my company has grown a lot and we can now afford offices for me and other people so any sound getting out is not going to botter anybody.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Sure that is no problem anymore. So open or closed is fine.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Yes I guess that would be a good description of it.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Not especially I think i prefer a more balanced "clean" sound. Don't want to sound to cheesy but as the artist intended it to be.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
@Majestic What seems to be lacking for me is that these headphones don't sound as clear as I would like, I have the feeling that when listening to a grand song some instruments are missing or are not as they are suppose to be. I always figured that it was because these headphones ware bluetoothm I and not really familiar with bluetooth vs cabel + dac.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
(Will get straight to the point) I am looking for a new headphone and DAC, I am at the moment in the market for new hardware as a few days ago I was at a store that had some great demo's for headphones. So decided to try one out and even on my cellphone with my music in (AAC 128?) it sounded amazing. So not being a big audiophile i was wondering what would you guys (and girls) recommend for a good headphone and DAC. At the moment I am using My Macbook pro's bluetooth (and cellphone) hooked-up to my Sony zx770bn and was wondering what improvement I can make and how to get a better sound. I dont mind switching to cable just have these bluetooth headphones as they sound decent and are noise canceling but as I just upgraded my self to a personal office that is not really needed anymore. I really do not listen to bassy(?) music. I listen really only to Metal (Melodic/Death/Power) bands like Epica, Be'lakor, Insomnium, Soilwork Scar Symmetry, Rammstein ... etc etc etc. the only other real requirement is that it cant be like crazy expensive (my limit is about 800 euro's == ~900$US) Thanks in advance.
- 18 replies
-
- headphones
- dac
-
(and 2 more)
Tagged with:
-
Thanks that is a really great suggestion I do pref AMD over NVIDIA in linux (driver hell). So will give the 390 a look. Also that video has my interest as would love to be able to use the power from it.
-
@Starelementpoke Would love to but at the moment have to wait for about 2 min each time i complete a turn (at around turn 120) when it is processing the AI so not really do-able. And yeah think it will be my testing server as it already has some decent spec's but yeah
-
I am planning to upgrade to 4K, I have been using 4k for about 4-5 Months now and I am loving it. Although I am not much of a gamer, I do more programming and software engineering this is also the reason that I am here looking for some advice. I have the following computers. Mac book Pro Retina 15 inch (specs) CPU : i7 5th gen 4cores @ 2.5ghz RAM : 16gb @ 1600mhz GPU : AMD Radeon r9 M370x 2gb GPU + Intel Iris Pro And a Mac Pro (non trash-bin model) (specs): CPU: Xeon E5*** 6 core x 2 cpus(so 12 cores total and 24 threads total) at 2.9ghz GPU: Really really bad (has 512MB of memory .... just to drive my displays and work on). RAM: 128GB 1300mhz EEC PSU: No pins available for extensions (I thought i would mention it as otherwise would have upgraded the gpu already) And a windows/linux testing server (specs): CPU: Xeon E5*** 4cores @ 3.2ghz GPU: 2x 7970 (Mostly for opengl and stuff, they for some reason cant handle 4k even together) RAM: 16GB I would love to be able to re-use on off those existing builds and upgrade it to 4k I already have 2 4k screens (they are really tv's 50hertz tough) and I would be fine with having a new (or upgraded computer) just being able to drive one of them but with a stable 50+ fps. As I already mentioned I do not play a lot of games but I am a big Civilization(4&5) Addict and World Of Warcraft and a little bit of EvE and Hearthstone thrown in there. So I would love something that would make CiV5 and WoW run more smoothly as with my Mac Book Pro hooked up to my 4k screen I get about 24 FPS (so cinamatic). So to get to the point. What would be the suggestion on which of the computers to upgrade to get a 50FPS(stable) on 4K game play for the above mentioned games. I would love to be able to re-use the above mentioned systems as those would have to remain running anyway (for work and as servers). I do not really have a budget in mind so not really constrained by this, but would love it to be somewhat normally priced and one very important thing for me is Silence i cant stand hearing my computers. Thanks in any case for the time, With kind regards, Arekana