Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60624286
create_data_folders.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 1, 13:26
Size
610 B
Mime Type
text/x-python
Expires
Fri, May 3, 13:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17385668
Attached To
R4670 PySONIC (old)
create_data_folders.py
View Options
import
os
import
tkinter
as
tk
from
tkinter
import
filedialog
# Get root directory from user
root
=
tk
.
Tk
()
root
.
withdraw
()
root
=
filedialog
.
askdirectory
()
assert
root
,
'No root directory chosen'
freqs
=
[
50
*
x
for
x
in
range
(
2
,
21
)]
subdirs
=
[
'CW'
,
'PRF0.10kHz'
,
'PRF1.50kHz'
]
for
f
in
freqs
:
dirpath
=
'{}/{}kHz'
.
format
(
root
,
f
)
print
(
dirpath
)
if
not
os
.
path
.
exists
(
dirpath
):
os
.
makedirs
(
dirpath
)
for
sd
in
subdirs
:
subdirpath
=
'{}/{}'
.
format
(
dirpath
,
sd
)
print
(
'-->'
,
subdirpath
)
if
not
os
.
path
.
exists
(
subdirpath
):
os
.
makedirs
(
subdirpath
)
Event Timeline
Log In to Comment