Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
wendelin
Commits
e1b63d97
Commit
e1b63d97
authored
Jul 29, 2016
by
Klaus Wölfel
Committed by
Klaus Wölfel
Aug 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow pandas and access of ndarray/ZBigArray in restricted python
/reviewed-on
nexedi/wendelin!19
parent
6b0ba0f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
product/Wendelin/__init__.py
product/Wendelin/__init__.py
+19
-0
No files found.
product/Wendelin/__init__.py
View file @
e1b63d97
...
...
@@ -44,3 +44,22 @@ for dtype in ('int8', 'int16', 'int32', 'int64', \
allow_module
(
'sklearn'
)
allow_module
(
'scipy'
)
allow_module
(
'wendelin.bigarray.array_zodb'
)
allow_module
(
'pandas'
)
allow_type
(
np
.
timedelta64
)
allow_type
(
type
(
np
.
c_
))
import
pandas
as
pd
allow_type
(
pd
.
Series
)
allow_type
(
pd
.
DatetimeIndex
)
allow_type
(
pd
.
DataFrame
)
# Modify 'safetype' dict in full_write_guard function
# of RestrictedPython (closure) directly To allow
# write access to ndarray and ZBigArray objects
from
RestrictedPython.Guards
import
full_write_guard
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
np
.
ndarray
]
=
True
from
wendelin.bigarray.array_zodb
import
ZBigArray
full_write_guard
.
func_closure
[
1
].
cell_contents
.
__self__
[
ZBigArray
]
=
True
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment