Watch target file/folder for changes in python files and import/reimport
Project description
watch_import
Watch_import uses watchfiles
to observe a file or folder. When a file is saved it will re/import that file into the watch_import context.
Using as a file/folder watcher
> watch_import PATH/TO_PYTHON_FILES
Using as an import
from watch_import import watch_me
print('hello')
watch_me()
Example use-case OCP CAD Viewer
import cadquery as cq
from ocp_vscode import show
from watch_import import watch_me
body = cq.Workplane("XY").box(5, 10, 15)
show(body)
watch_me()
Run this file once and it will start watching and "re-run" once saved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
watch_import-0.0.2.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for watch_import-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a85e517b5117a35e1c4788e70a62b5410f469eea8f0c7b3df54f74544e06a1 |
|
MD5 | 51aabc5999a43bb49d0d3a07b561953c |
|
BLAKE2b-256 | e21c699d816d7d4eaab247d417ebd45e2455cec39159f0dcec2e61ee606e4d36 |