This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import types | |
class Hook: | |
def __init__(self, defaultfunc=None): | |
self._defaultfunc = defaultfunc | |
self._funcs = [] | |
def __call__(self, *args): | |
if len(self._funcs) == 0 and callable(self._defaultfunc): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import types | |
class Hook: | |
_sys = sys | |
def __init__(self): | |
self._default = True | |
self._funcs = [] | |
def __call__(self, exctype, value, tb): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyunity import * | |
class PlayerController(Behaviour): | |
speed = ShowInInspector(int, 15) | |
rigidbody = ShowInInspector(Rigidbody) | |
def Update(self, dt): | |
x = Input.GetRawAxis("Horizontal") | |
y = Input.GetRawAxis("Vertical") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import importlib | |
class CythonPackageMetaPathFinder(importlib.abc.MetaPathFinder): | |
def __init__(self, name_filter): | |
super(CythonPackageMetaPathFinder, self).__init__() | |
self.name_filter = name_filter | |
def find_module(self, fullname, path): | |
if fullname.startswith(self.name_filter + "."): |