Hi 王衡, Normally you can use any library you want in the sandbox, as long as it doesn't use C-code; all the pure-python stuff should work. Add the library's parent directory to the virtual root in sandlib, and make sure that pypy will search for that directory. (Add it to sys.path in the sandbox, or use PYTHONPATH -- I think.)
There are however some things that appear not to work. I never got datetime.datetime.now() working. Logically this would be a system call and could have been handled by a do_ll_os...-function in sandlib. However I never noticed any such call for retrieving the current time. Any ideas...? Another known issue is that libraries which use _struct, will not work, unless you translate the sandbox with this module included. They say however that inclusion of this module could be dangerous. I which for a safe version of _struct that could be used in the sandbox. Can't we have a pure-python version of _struct? (Even with the performance degration, it would be very helpful as quite a lot of libraries depend on this one.) Cheers, Jonathan 2013/4/7 王衡 <kurskk...@gmail.com>: > Hi: > About PyPy's sandbox,I want to ask you a question: > In PyPy's sandbox ,a lot of standard libraries can not be used.If I want use > it,how could I add it in PyPy's sandbox? > (you can assume I have verify the module's safety) > > _______________________________________________ > pypy-dev mailing list > pypy-dev@python.org > http://mail.python.org/mailman/listinfo/pypy-dev > _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev