Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_current_env() -> 'Environment':
global _cur_env
if _cur_env is None:
import vapoursynth
_cur_env = vapoursynth.vpy_current_environment
try:
_cur_env()
except RuntimeError:
return None
return script.perform(lambda: vapoursynth.vpy_current_environment()).result()
env = vss.get('ipython').perform(lambda: vs.vpy_current_environment()).result()
with env: