One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
Macaulay2
/
Python
/
Edit File:
no-python.m2
-- definitions for when Macaulay2 is built w/o Python support exportFrom_Core {"PythonObject"} export { "addPyToM2Function", "getattr", "getitem", "hasattr", "import", "pythonValue", "setattr", "setitem", "toFunction", "toPython", "objectType", "runSimpleString"} errmsg = "Macaulay2 was built without Python support" err = x -> error errmsg addPyToM2Function = method() addPyToM2Function(String, Function, String) := addPyToM2Function(List, Function, String) := err getattr = method() getattr(PythonObject, String) := err getitem = method() getitem(PythonObject, Thing) := err hasattr = method() hasattr(PythonObject, String) := err import = method() import String := err iterator PythonObject := err next PythonObject := err pythonValue = method(Dispatch => Thing) pythonValue String := pythonValue Sequence := err setattr = method() setattr(PythonObject, String, Thing) := err setitem = method() setitem(PythonObject, Thing, Thing) := err toFunction = method() toFunction PythonObject := err toPython = method() for type in { Boolean, CC, Constant, Function, HashTable, Nothing, PythonObject, QQ, RR, Sequence, Set, String, VisibleList, ZZ } do installMethod(toPython, type, err) for op in {symbol +, symbol -, symbol *, symbol /, symbol //, symbol %, symbol ^, symbol <<, symbol >>, symbol &, symbol |, symbol ^^, symbol and, symbol or, symbol xor, symbol ==, symbol ?, symbol @} do ( installMethod(op, PythonObject, PythonObject, err); installMethod(op, PythonObject, Thing, err); installMethod(op, Thing, PythonObject, err)) -- unary methods for m in { length, value, symbol +, symbol -, abs, symbol ~, round, truncate, floor, ceiling, help#0 } do installMethod(m, PythonObject, err) -- binary methods (PythonObject, Thing) for m in { symbol SPACE, symbol @@, symbol_, quotientRemainder } do installMethod(m, PythonObject, Thing, err) -- others isMember(Thing, PythonObject) := isMember(PythonObject, PythonObject) := quotientRemainder(PythonObject, PythonObject) := quotientRemainder(Thing, PythonObject) := round(ZZ, PythonObject) := round(PythonObject, PythonObject) := err objectType = x -> error errmsg runSimpleString = x -> error errmsg
Simpan