Skip to content

Commit

Permalink
signalflow_examples: Download to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Nov 10, 2023
1 parent 8e847a1 commit f154889
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auxiliary/libs/signalflow_examples/signalflow_examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import urllib.request
import logging
import ssl
import os

#--------------------------------------------------------------------------------
# ignore local expired SSL certificates
Expand Down Expand Up @@ -29,9 +30,12 @@ def download_examples() -> None:
"sequencing-example.py",
"wavetable-2d-example.py",
]
local_dir = "examples"
os.makedirs(local_dir, exist_ok=True)
for filename in examples:
url = "%s%s" % (url_prefix, filename)
urllib.request.urlretrieve(url, filename)
output_path = os.path.join(local_dir, filename)
urllib.request.urlretrieve(url, output_path)
print(" - Downloaded: %s" % filename)

if __name__ == "__main__":
Expand Down

0 comments on commit f154889

Please sign in to comment.