ceasar / easywatch Goto Github PK
View Code? Open in Web Editor NEWDead-simple way to watch a directory.
Home Page: http://pypi.python.org/pypi/easywatch/
License: MIT License
Dead-simple way to watch a directory.
Home Page: http://pypi.python.org/pypi/easywatch/
License: MIT License
Example: Instead of:
if __name__ == "__main__":
def handler(event_type, src_path):
if event_type == "modified":
...
Do:
if __name__ == "__main__":
def handler(event_type, src_path):
if event_type == easywatch.MODIFIED:
...
Ideally, this should happen in watchdog itself.
The project only publishes sdists, meaning that the end-users will go through the build process during install. As the installer usually pulls in the last setuptools version, it's subject to changes in the ecosystem. Currently, there's some warnings like
setuptools.warnings.SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'license-file' will not be supported in future
versions. Please use the underscore name 'license_file' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
In about a month, those warnings will turn into errors.
There's a few things that could be done:
Clearly copied from another project
Import error. Requires watchdog installed first.
Whenever a file is moved in the watched directory, the registered handler has only access to the original path of the file not the new path. I think it makes easywatch pretty useless for this kind of events. In particular, this issue blocks full resolution of staticjinja/staticjinja#20.
Fixing this is trivial, e.g. one can require the handler to accept one more argument which would be the destination path for moved event and None otherwise. But of course this will break 100% scripts using easywatch. Do you know if there other projects than staticjinja relying on easywatch?
Not very hard. Don't forget to use traceback.
Can you please add the versions in git as tags? This really helps out to see quickly changes and all from version to version
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.