ljmccarthy / fsmonitor Goto Github PK
View Code? Open in Web Editor NEWFilesystem monitoring library for Python
License: MIT License
Filesystem monitoring library for Python
License: MIT License
You need add
self._contents=[]
to line 33 of polling.py
Hello,
it would be great to be able to install fsmonitor with pip wouldn't it. I have "worked" on it (although with the already existing setup.py there wasn't much to do).
See here (I had to play with pypitest so don't take into account the name and version)
The use of double underscores makes subclassing your code very difficult. From what I can tell you should be fine by using single underscores instead (e.g. self.__monitor should become self._monitor). For further explanation see e.g. http://stackoverflow.com/questions/162798/subclassing-a-class-with-private-members.
Polling doesnt' work at all. I edited fsmonitor/__init__.py
to force use of polling.py
and all test fail on Linux and w32, Python 2.7 and 3.5:
test1.py
Traceback (most recent call last):
File "test1.py", line 11, in <module>
assert test.event_happened(FSEvent.Create, "x")
AssertionError
test2.py
Traceback (most recent call last):
File "test2.py", line 12, in <module>
assert test.event_happened(FSEvent.Create, "x")
AssertionError
test3.py
Traceback (most recent call last):
File "test3.py", line 10, in <module>
assert False, "Expected exception"
AssertionError: Expected exception
Does the project work with Python 3? I got this error trying to run tests under Python 3.3 to 3.6:
cd tests
python3.x test1.py
Error:
Traceback (most recent call last):
File "test1.py", line 5, in <module>
w = test.add_dir_watch(tempdir)
File "/usr/local/src/Python/textern/fsmonitor/tests/test.py", line 21, in add_dir_watch
return self.monitor.add_dir_watch(*args, **kwargs)
File "/usr/local/src/Python/textern/fsmonitor/tests/../fsmonitor/__init__.py", line 45, in add_dir_watch
return self.monitor.add_dir_watch(path, flags=flags, user=user, **kwargs)
File "/usr/local/src/Python/textern/fsmonitor/tests/../fsmonitor/linux.py", line 140, in add_dir_watch
return self._add_watch(path, flags, user, IN_ONLYDIR)
File "/usr/local/src/Python/textern/fsmonitor/tests/../fsmonitor/linux.py", line 130, in _add_watch
wd = inotify_add_watch(self.__fd, path, inotify_flags)
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
I'm getting a "OverflowError: Python int to large to convert to C long" whenever I run a teat or do a simple dir watch. It seems to be coming from read_events in win32.py.
Let me know what I should do, thanks!
Feature request: An option to pause watches would be really nice.
The code in setup.py
is prepared to work in the case there is no README.rst
. Why? In what case the file is absent?
I have problems running the tests on w32. I reset the master
branch to commit 78e77b7 to test the original code. test1.py
passes with Python 2.7 and 3.5. test2.py
fails with Python 2.7 and 3.5:
Traceback (most recent call last):
File "test2.py", line 12, in <module>
assert test.event_happened(FSEvent.Create, "x")
AssertionError
test3.py
passes with Python 2.7 and fails under Python 3.5 because e.errno
is equal to errno.ESRCH
, not ENOENT
.
The last error I can fix (see commit 02a9a99) but I don't know what to do with test2.py
.
I run the filewatch.py example on my linux centos 7 with default python
no event triggered
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.