diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-12 19:32:20 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-12 19:32:20 +0200 |
| commit | 17eda4dedb0d70c5a82edf77e9b3aaa1af5bfb19 (patch) | |
| tree | e6b7257708cadba242006202345f9b7caf094594 /README.md | |
| parent | ef087c3849cfbe58f4f77e09367d6fbf152e5498 (diff) | |
| download | nissy-core-17eda4dedb0d70c5a82edf77e9b3aaa1af5bfb19.tar.gz nissy-core-17eda4dedb0d70c5a82edf77e9b3aaa1af5bfb19.zip | |
Initial support for Python
Diffstat (limited to '')
| -rw-r--r-- | README.md | 35 |
1 files changed, 35 insertions, 0 deletions
| @@ -150,6 +150,41 @@ F' U R | |||
| 150 | 150 | ||
| 151 | For a full list of available command, use `run help`. | 151 | For a full list of available command, use `run help`. |
| 152 | 152 | ||
| 153 | ## Running commands from a Python shell | ||
| 154 | |||
| 155 | There is a work-in-progress python module available. To build it you need | ||
| 156 | the Python development headers installed. You can check this from the output | ||
| 157 | of `./configure.sh`: | ||
| 158 | |||
| 159 | ``` | ||
| 160 | $ ./configure.sh | ||
| 161 | ... | ||
| 162 | Python3 development libraries: version 3.12 | ||
| 163 | ``` | ||
| 164 | |||
| 165 | Then to build the module: | ||
| 166 | |||
| 167 | ``` | ||
| 168 | $ make python | ||
| 169 | ``` | ||
| 170 | |||
| 171 | And to import it | ||
| 172 | |||
| 173 | ``` | ||
| 174 | $ python # In the main folder | ||
| 175 | >>> import nissy_python_module as nissy # In the python shell | ||
| 176 | ``` | ||
| 177 | |||
| 178 | From here you can call the library functions directly, for example: | ||
| 179 | |||
| 180 | ``` | ||
| 181 | >>> nissy.compose("NEORSQLH=ZFCYUAGLHTKB", "NEORSQLH=ZFCYUAGLHTKB") | ||
| 182 | 'ASTUGFBH=DACXEZGBLIKF' | ||
| 183 | ``` | ||
| 184 | |||
| 185 | Please note: as this is work in progress, not all functions are currently | ||
| 186 | available from the Python module. | ||
| 187 | |||
| 153 | ## Cube formats | 188 | ## Cube formats |
| 154 | 189 | ||
| 155 | The cube is represented as a string in one of the following formats, | 190 | The cube is represented as a string in one of the following formats, |
