diff options
Diffstat (limited to 'python/examples')
| -rw-r--r-- | python/examples/move.py | 5 | ||||
| -rw-r--r-- | python/examples/solve.py | 4 | ||||
| -rw-r--r-- | python/examples/variations.py | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/python/examples/move.py b/python/examples/move.py index 3cdd606..9c7a756 100644 --- a/python/examples/move.py +++ b/python/examples/move.py | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | # Small example of nissy_python_module usage | 1 | # Small example of nissy_python_module usage |
| 2 | # See the solve.py example for more details on how this works | 2 | # See the solve.py example for more details on how this works |
| 3 | 3 | ||
| 4 | from sys import path | 4 | import os, sys |
| 5 | path.append("./") | 5 | |
| 6 | sys.path.append(os.getcwd()) | ||
| 6 | import nissy_python_module as nissy | 7 | import nissy_python_module as nissy |
| 7 | 8 | ||
| 8 | cube = nissy.applymoves(nissy.solved_cube, "R' U' F"); | 9 | cube = nissy.applymoves(nissy.solved_cube, "R' U' F"); |
diff --git a/python/examples/solve.py b/python/examples/solve.py index a60c432..e3752fe 100644 --- a/python/examples/solve.py +++ b/python/examples/solve.py | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | # folder containing nissy_python_module.so | 4 | # folder containing nissy_python_module.so |
| 5 | 5 | ||
| 6 | # Append the main folder to the python path so we can load the module | 6 | # Append the main folder to the python path so we can load the module |
| 7 | from sys import path | 7 | import sys, os |
| 8 | path.append("./") | 8 | sys.path.append(os.getcwd()) |
| 9 | 9 | ||
| 10 | # Import with a nicer name | 10 | # Import with a nicer name |
| 11 | import nissy_python_module as nissy | 11 | import nissy_python_module as nissy |
diff --git a/python/examples/variations.py b/python/examples/variations.py index 1b85d32..1a9d5bb 100644 --- a/python/examples/variations.py +++ b/python/examples/variations.py | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | # Small example of nissy_python_module usage | 1 | # Small example of nissy_python_module usage |
| 2 | # See the solve.py example for more details on how this works | 2 | # See the solve.py example for more details on how this works |
| 3 | 3 | ||
| 4 | from sys import path | 4 | import sys, os |
| 5 | path.append("./") | 5 | sys.path.append(os.getcwd()) |
| 6 | import nissy_python_module as nissy | 6 | import nissy_python_module as nissy |
| 7 | 7 | ||
| 8 | moves = "R U' Bw2 M D' x' F B(E2 F D B' Lw2 U2 U' S2 B)" | 8 | moves = "R U' Bw2 M D' x' F B(E2 F D B' Lw2 U2 U' S2 B)" |
