diff options
Diffstat (limited to 'README.md')
| -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, |
