packages = [ "sqlite-utils"] # this runs if we launch fetch.html from 'http://127.0.0.1:8000/fetch.html' # error is : PyScript: Access to local files (using "Paths:" in ) is not available when directly opening a HTML file [[fetch]] #from = 'http://127.0.0.1:8000/' from = 'http://localhost:8000/' files = ['readme.txt'] to_folder = './here' [[fetch]] from = "https://pyscript.net/examples/" files = ["utils.py"] to_folder = "docs" [[fetch]] from = "https://gist.githubusercontent.com/FabioRosado/faba0b7f6ad4438b07c9ac567c73b864/raw/37603b76dc7ef7997bf36781ea0116150f727f44/" files = ["todo.py"] to_folder = "docs"

Fetch Example

import os for d in os.walk('.'): for file in d[2]: print(f'{d[0]}/{file}') with open('./here/readme.txt', 'r') as fp: print(fp.read())