Lock a mutex file.
This can be used to prevent scripts from having more than one instance of
themselves running at the same time as follows:
if __name__ == "__main__":
with mutex(__file__):
main()
Parameters:
| Name |
Type |
Description |
Default |
filename
|
str
|
|
required
|