We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am expecting the module.get_member() function to get variable from the vm.code() result. But everytime It returns just None.
from node_vm2 import NodeVM, VMServer, VM vm_option = { 'console': 'inherit', 'sandbox': [ ], 'require': { 'external': [], 'builtin': [], 'import': [], 'root': "./", 'mock': { } } } with VMServer() as server: with NodeVM(server=server, **vm_option) as vm: with vm.code("var abc = 'aa';") as module: print(module.get_member('abc'))
print(module.get_member('abc')) just shows None.
The text was updated successfully, but these errors were encountered:
In Node.js, variables need to be exported so that they can be accessed from outside of the module. Try changing the JS code to:
var abc = 'aa'; exports.abc = abc;
Sorry, something went wrong.
It's working great! Thank you!
No branches or pull requests
I am expecting the module.get_member() function to get variable from the vm.code() result.
But everytime It returns just None.
print(module.get_member('abc')) just shows None.
The text was updated successfully, but these errors were encountered: