Importable python_lib.zip assets
Lots of plumbing to allow an asset named python_lib.zip to be imported by jailed Python code. This function can find the "python_lib.zip" asset, and is passed down through ModuleSystem and LoncapaSystem so that capa problems have access to the zipfile.
This commit is contained in:
3
common/test/data/uploads/python_lib_zip/README.txt
Normal file
3
common/test/data/uploads/python_lib_zip/README.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Use this directory to make the python_lib.zip file above:
|
||||
|
||||
$ zip -r python_lib.zip python_lib_zip/*
|
||||
@@ -0,0 +1,5 @@
|
||||
def seventeen():
|
||||
return 17
|
||||
|
||||
def fortytwo(x):
|
||||
return 42+x
|
||||
1
common/test/data/uploads/python_lib_zip/sub/submodule.py
Normal file
1
common/test/data/uploads/python_lib_zip/sub/submodule.py
Normal file
@@ -0,0 +1 @@
|
||||
HELLO = "world"
|
||||
Reference in New Issue
Block a user