of-watchdog | Reverse proxy for STDIO and HTTP microservices | Function As A Service library
kandi X-RAY | of-watchdog Summary
kandi X-RAY | of-watchdog Summary
Reverse proxy for STDIO and HTTP microservices
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of of-watchdog
of-watchdog Key Features
of-watchdog Examples and Code Snippets
Community Discussions
Trending Discussions on of-watchdog
QUESTION
I'm still learning Python so I apologize up front. I am trying to write a watcher that watches for the creation of a file that matches a specific pattern. I am using watchdog with some code that is out there to get it watch a directory.
I don't quite understand how to have the watcher watch for a filename that matches a pattern. I've edited the regexes=[]
field with what I think might work but I have not had luck.
Here is an example of a file that might come in: Hires For Monthly TM_06Jan_0946.CSV
I can get the watcher to tell me when a .CSV is created in the directory, I just can't get it to only tell me when essentially Hires.*\.zip
is created.
I've checked the this link but have not had luck How to run the RegexMatchingEventHandler of Watchdog correctly?
Here is my code:
...ANSWER
Answered 2020-Mar-20 at 16:06The reason why '.*'
regex works and while the Hires.*\.zip
regex doesn't is watchdog tries to match the full path with the regex. In terms of regex: r'Hires.*\.zip'
will not give you a full match with "C:\Users\Downloads\Hires blah.zip"
Instead, try:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install of-watchdog
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page