1

I want to translate an analysis JavaScript file from JS to Python. It starts with the loading of a module :

var temporalSegmentation = require('users/wiell/temporalSegmentation:temporalSegmentation') // Load module

but if I translate it to Python :

# load module 
temporalSegmentation = require('users/wiell/temporalSegmentation:temporalSegmentation')

I get the following error

NameError: name 'require' is not defined

which makes sense as require is not a Python function. So is there a way for me to load this module from the JS file or do I need to rewrite everything into Python?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.