diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 09:36:36 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 09:36:36 +0100 |
| commit | 50bd8f0f568120e554d416f474cc72247d0b3240 (patch) | |
| tree | 236b8ebed5af17f8220981deffd69b97f0d08fe7 /python/examples/solve.py | |
| parent | 315d0f118f3d5ec2578249182f7b0eebf99d2943 (diff) | |
| parent | b36ed11e322152ff9ab813af78a08c35b42d5f94 (diff) | |
| download | nissy-core-50bd8f0f568120e554d416f474cc72247d0b3240.tar.gz nissy-core-50bd8f0f568120e554d416f474cc72247d0b3240.zip | |
Merge branch 'master' of https://github.com/sebastianotronto/nissy-core into windows
Diffstat (limited to 'python/examples/solve.py')
| -rw-r--r-- | python/examples/solve.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python/examples/solve.py b/python/examples/solve.py index e3752fe..d77dd74 100644 --- a/python/examples/solve.py +++ b/python/examples/solve.py | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | # Small example of nissy_python_module usage | 1 | # Small example of nissy Python module usage |
| 2 | 2 | ||
| 3 | # Compile the python module with "make python", then run this from the main | 3 | # Run "./build python", then run this from either the top-level directory |
| 4 | # folder containing nissy_python_module.so | 4 | # of the nissy-core repo or from the python subdirectory. |
| 5 | 5 | ||
| 6 | # Append the main folder to the python path so we can load the module | 6 | # Append the directories to the python path so we can load the module |
| 7 | import sys, os | 7 | import sys, os |
| 8 | sys.path.append(os.getcwd()) | 8 | sys.path.append(os.getcwd()) |
| 9 | sys.path.append(os.getcwd() + os.path.sep + "python") | ||
| 9 | 10 | ||
| 10 | # Import with a nicer name | 11 | # Import with a nicer name |
| 11 | import nissy_python_module as nissy | 12 | import nissy |
| 12 | 13 | ||
| 13 | # Choose the solver you prefer | 14 | # Choose the solver you prefer |
| 14 | solver = "h48h0k4" | 15 | solver = "h48h0k4" |
