Skip to content

Instantly share code, notes, and snippets.

@ChuckFoo
ChuckFoo / crash_isolation.py
Created September 3, 2015 18:26
isolate yourself from crashy binary modules in Python using multiprocessing
###########################################################################
#
# timeout wrapper around multiprocessing from:
# http://code.activestate.com/recipes/577853-timeout-decorator-with-multiprocessing/
# modified to add crash detection without simply locking up or exitting completely
#
###########################################################################
class TimeoutException(Exception):
pass
@ChuckFoo
ChuckFoo / fusepy_passthrough_case_insensitive.py
Last active July 9, 2018 17:20
An example fusepy module to do a loopback mount of a directory with case insensitive file access
#!/usr/bin/env python
# Original example from here:
# http://www.stavros.io/posts/python-fuse-filesystem/
# modified so that the _full_path helper function also tries to find a case
# insensitive match for what you asked for, using the recipe here:
# http://code.activestate.com/recipes/576571-case-insensitive-filename-on-nix-systems-return-th/
#
# Depends on fusepy:
# https://github.com/terencehonles/fusepy