Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View KurtJacobson's full-sized avatar

Kurt Jacobson KurtJacobson

View GitHub Profile
@KurtJacobson
KurtJacobson / module_watcher.py
Created October 17, 2017 22:46 — forked from eberle1080/module_watcher.py
Automatically reload python module / package on file change
#!/usr/bin/env python
# Author: Chris Eberle <eberle1080@gmail.com>
# Watch for any changes in a module or package, and reload it automatically
import pyinotify
import imp
import os
class ModuleWatcher(pyinotify.ProcessEvent):
"""
#define ENCODER_OPTIMIZE_INTERRUPTS
#include <Encoder.h>
#include <LedControl.h>
Encoder knob(0, 1);
LedControl lc = LedControl(12, 11, 10, 3);
int steps = 0;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hal
import sys
import signal
import linuxcnc
import copy
import time