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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file watch_import-0.0.2.tar.gz.
File metadata
- Download URL: watch_import-0.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5349cb61ec23fc4643b8835e81423292a4245df71375ccf9b4f960954c9fcfb6
|
|
| MD5 |
533992eb0e6e664808c8f5fbc317b1a8
|
|
| BLAKE2b-256 |
2dec241ee8d3b4b7a05af9575888e1691692504676a1f3ea5142e7e6f6e9e793
|
File details
Details for the file watch_import-0.0.2-py3-none-any.whl.
File metadata
- Download URL: watch_import-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26a85e517b5117a35e1c4788e70a62b5410f469eea8f0c7b3df54f74544e06a1
|
|
| MD5 |
51aabc5999a43bb49d0d3a07b561953c
|
|
| BLAKE2b-256 |
e21c699d816d7d4eaab247d417ebd45e2455cec39159f0dcec2e61ee606e4d36
|