source: git/Singular/dyn_modules/python/README @ 4bde6b

spielwiese
Last change on this file since 4bde6b was 4bde6b, checked in by Hans Schoenemann <hannes@…>, 4 years ago
spelling p1
  • Property mode set to 100644
File size: 3.3 KB
Line 
1For binary distributions remember to set the environment vraiable
2PYTHONPATH to the directories containing the Singular python modules
3(interpreter.py, utils.py, usually the Singular LIB directory)
4and to your python directory (usually .)
5
6Example for bash etc.:
7export PYTHONPATH=".:/usr/local/Singular/3-0-2/LIB"
8
9Requirements for building:
10--------------------------
11install scons (the build tool)
12install boost::python
13install boost
14dynamic modules working
15have a working Singular build directory
16NOSTREAMIO disabled in factory (rebuild also claptmpl.o in Singular)
17install python-numeric (for matrix report)
18
19Suggested additional modules:
20probstat: fast (C-Impl.) combinatorics (permutations, cartesian products)
21lxml for openmath
22
23
24supported interpreter values:
25
26INPUT:
27int
28poly
29vector
30number
31matrix
32ideal
33list
34string
35ring
36intvec
37
38Output:
39int
40poly
41vector
42number
43matrix
44ideal
45list
46string
47ring
48intvec
49
50typemappings:
51interpreter, python internal, python official name
52int -> int
53poly -> Poly ->Polynomial
54vector -> Vector -> Vector
55number -> Number ->Number
56matrix -> Numeric.array
57ideal -> Ideal ->Ideal
58list -> list
59string -> str
60ring -> ring(in a Ring, but this does nothing) ->ring
61BUILD:
62--------
63just type:
64scons
65
66adjust PYTHONPATH:
67-----------------
68python must be able to find interpreter.py
69so either
70export PYTHONPATH="<singroot>/modules/python"
71but
72for me simply
73export PYTHONPATH=
74 also works
75
76Test:
77-----
78../../Singular/Singular <testfile>
79where testfile is in
80powertester
81polytester interpretertester
82if an exceptions occurs, review the code it may be wanted for examples the last line in interpretertester
83
84TASKS:
85------
86- push and pop rings, automatically change rings, if Singular functions are executed
87-Map more types
88-throw Python exception if something fails
89-testing
90-write some module presenting the power of python
91  compared to the Singular interpreter language
92- make modgen work properly
93- make the functionality available build in the kernel for the windows platform
94- documentation
95- provide feedback for missing functionality
96-smart pointer for ring in Poly
97
98RULES:
99-----
100
101If you want to help, which would make me happy, follow some simple rules:
102
103- divide the work in layers, so what is a problem of a better C++-Interface should be done in the Singular kernel (compare Number.h, Poly.h PowerSeries.h), the Pythonwrapper itself should be ultrathin
104-raw operations (+,-,* creation of res...) should map directly to the Singular kernel (prefereable nice C++ wrapper classes in the kernel)
105- Wrapper classes in C++ should behave like canonical C++-Classes, no additional res.-management (with the exception of new, delete) should be required
106- never use currRing implicitly, always write out the currRing argument, if this isn't done consequently in my code, it would be nice of you to fix it
107- regularly check in, check out from CVS
108
109
110NEWS:
111*global_functions has be renamed to singular_globals_proxy
112the old name exists for short time for compat.
113
114*it is now possible to use the singular_globals_proxy for
115    -reading global variables
116    -writing global variables, if the var exists with the correct type in the interpreter
117    -calling global interpreter and builtin functions (not builtins, for example groebner but not std
118
119successfully tested systems:
120linux: x86, x86_64
121Mac OS X:G4,
122windows (ask Oliver)
123
124
125
126
127
Note: See TracBrowser for help on using the repository browser.