From 9c5c7af7abe9e444210ac86b903eee775fc76a84 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 8 Aug 2025 15:17:43 +0200 Subject: Small fixes --- python/examples/move.py | 5 +++-- python/examples/solve.py | 4 ++-- python/examples/variations.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'python/examples') 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 @@ # Small example of nissy_python_module usage # See the solve.py example for more details on how this works -from sys import path -path.append("./") +import os, sys + +sys.path.append(os.getcwd()) import nissy_python_module as nissy 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 @@ # folder containing nissy_python_module.so # Append the main folder to the python path so we can load the module -from sys import path -path.append("./") +import sys, os +sys.path.append(os.getcwd()) # Import with a nicer name 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 @@ # Small example of nissy_python_module usage # See the solve.py example for more details on how this works -from sys import path -path.append("./") +import sys, os +sys.path.append(os.getcwd()) import nissy_python_module as nissy moves = "R U' Bw2 M D' x' F B(E2 F D B' Lw2 U2 U' S2 B)" -- cgit v1.3