1 parent 5ed74c3 commit f2154feCopy full SHA for f2154fe
2 files changed
README.md
@@ -82,8 +82,10 @@ def main():
82
# Your code
83
pass
84
85
-with objwatch.ObjWatch(['your_module.py']):
+if __name__ == '__main__':
86
+ obj_watch = objwatch.watch(['your_module.py'])
87
main()
88
+ obj_watch.stop()
89
```
90
91
### Example Usage
docs/source/index.rst
@@ -91,8 +91,10 @@ Using the API
92
93
94
- with objwatch.ObjWatch(['your_module.py']):
+ if __name__ == '__main__':
95
96
97
98
99
Example Usage
100
--------------
@@ -393,4 +395,4 @@ Indices and tables
393
395
394
396
* :ref:`genindex`
397
* :ref:`modindex`
-* :ref:`search`
398
+* :ref:`search`
0 commit comments