From fa087798334f81afe0e346e49f8efc6cb7dafc99 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 1 Nov 2026 13:26:32 +0100 Subject: [PATCH] Die Welt ist ein eigener Baum: Projects/pokersim pokersim (Klon, Cockpit, Ansicht, Leser, Mitschriebe) steht jetzt getrennt neben der Engine. Der Grund, warum es vorher nicht allein stehen konnte, ist behoben: * client/ (Adresse des Clients und seine zwei Sockets) liegt nicht mehr in hand/ - beide Seiten finden es ueber die Naht; die Engine braucht dafuer nichts aus der Welt zu importieren * die Wurzelmarke aller Dateien ist "lesen" statt "hand": damit findet jede Datei ihre Wurzel, egal in welchem der beiden Baeume sie steht (126 Stellen) * werkzeuge/hof.py kann beide Baeume bauen: HOF_ART=welt -> Projects/pokersim (Welt), ohne -> Projects/pokerfreak-sim (Welt und Engine). Die Welt waehlt ihre Pruefungen nach IMPORTEN (Prosa darf die gedockte Engine nennen), der volle Hof nach Erwaehnungen. Abnahme: Engine-Baum schneller Lauf 1444 Faelle (1 Flatterer, allein gruen); Welt-Baum 38 Pruefungen 333 Faelle rot 0, Bericht 9 Stellen. swift run Pruefung 132 gruen. --- betrieb/regie.py | 1 + betrieb/runner.py | 4 +-- betrieb/statistik.py | 4 +-- betrieb/zuschauer_lauf.py | 2 +- {hand => client}/pipe.py | 0 {hand => client}/umgebung.py | 0 entscheiden/decide.py | 4 +-- hand/act.py | 4 +-- hand/befehle.py | 4 +-- hand/beitritt.py | 8 +++++ hand/click.py | 4 +-- hand/denkzeit.py | 4 +-- hand/dialog.py | 4 +-- hand/fenster.py | 4 +-- hand/foto.py | 4 +-- hand/hudquelle.py | 4 +-- hand/kanal.py | 3 +- hand/klonmaus.py | 4 +-- hand/notaus.py | 2 +- hand/press.py | 4 +-- hand/sitzen.py | 4 +-- hand/stellen.py | 4 +-- hand/tasten.py | 3 +- korpus/abgleich.py | 4 +-- korpus/durchlauf.py | 2 +- korpus/korpus.py | 4 +-- lesen/ergebnis.py | 4 +-- lesen/formats.py | 4 +-- lesen/observe.py | 4 +-- lesen/spot_from_log.py | 4 +-- lesen/turnier.py | 4 +-- lobby/auswahl.py | 2 +- mcp/debug.py | 10 ++++++- mcp/diagnose.py | 4 +-- mcp/lobby_adapter.py | 2 +- mcp/lobby_heilung.py | 2 +- mcp/server.py | 4 +-- mcp/stopp.py | 3 +- mock/bruecke.py | 6 ++++ mock/start.py | 1 + mock/vorlage.py | 4 +-- sicht/ansicht.py | 4 +-- sicht/quellen.py | 4 +-- sicht/steuern.py | 2 +- sicht/tische.py | 6 ++++ tests/antworten_spec.py | 2 +- tests/auswahl_spec.py | 2 +- tests/befehle_spec.py | 3 +- tests/befund_kette_spec.py | 2 +- tests/befund_spec.py | 2 +- tests/bild_vorlagen_spec.py | 4 +-- tests/bruecke_kette_spec.py | 1 + tests/denkzeit_spec.py | 4 +-- tests/dialog_spec.py | 2 +- tests/echtheit_klon_spec.py | 2 +- tests/eingabe_spec.py | 4 +-- tests/evchop_echt_spec.py | 2 +- tests/evchop_regel_spec.py | 2 +- tests/fenster_mock_spec.py | 4 +-- tests/fraud_spec.py | 2 +- tests/funde_spec.py | 2 +- tests/gedenkzeit_spec.py | 2 +- tests/geld_spec.py | 2 +- tests/geldplan_spec.py | 2 +- tests/handbewertung_spec.py | 2 +- tests/hudquelle_spec.py | 4 +-- tests/invarianten_spec.py | 2 +- tests/kanal_spec.py | 3 +- tests/kern_frisch_spec.py | 4 +-- tests/klick_ziel_spec.py | 4 +-- tests/klickweg_spec.py | 1 + tests/klonlauf.py | 2 +- tests/klonmaus_spec.py | 2 +- tests/laeufer_sitzen_spec.py | 4 +-- tests/lagen_spec.py | 4 +-- tests/live_position_spec.py | 4 +-- tests/lobby_heilung_spec.py | 2 +- tests/lobby_warten_spec.py | 4 +-- tests/maus_spec.py | 3 +- tests/mcp_server_spec.py | 4 +-- tests/mock_spec.py | 4 +-- tests/nachsehen_spec.py | 4 +-- tests/notaus_spec.py | 4 +-- tests/notaus_waechter_spec.py | 3 +- tests/pipe_spec.py | 3 +- tests/profil_dialog_spec.py | 2 +- tests/rake_spec.py | 2 +- tests/rakeback_spec.py | 2 +- tests/schnittstelle_spec.py | 7 +++-- tests/sicht_ansicht_spec.py | 2 +- tests/sicht_instanz_spec.py | 2 +- tests/sicht_leiste_spec.py | 2 +- tests/sicht_modus_spec.py | 4 +-- tests/sicht_steuern_spec.py | 2 +- tests/sitzen_spec.py | 4 +-- tests/sperre_spec.py | 2 +- tests/spielplan_formate_spec.py | 4 +-- tests/spielplan_spec.py | 2 +- tests/stellen_spec.py | 4 +-- tests/strom_spec.py | 4 +-- tests/tasten_spec.py | 3 +- tests/tisch_schliessen_spec.py | 2 +- tests/tischlage_spec.py | 2 +- tests/tischziel_spec.py | 4 +-- tests/tischzustand_spec.py | 4 +-- tests/turnier_anfrage_spec.py | 4 +-- tests/uebersetzung_spec.py | 4 +-- tests/uhren_spec.py | 1 + tests/vorn_spec.py | 3 +- tests/vorteile_spec.py | 2 +- tests/wiedergabe_spec.py | 2 +- tests/zeiger_spec.py | 3 +- tests/zeitplan_spec.py | 2 +- tests/zuschauer_spec.py | 4 +-- werkzeuge/axpress.py | 4 +-- werkzeuge/hof.py | 52 +++++++++++++++++++++++++++++---- werkzeuge/hof_story.py | 2 ++ werkzeuge/hover.py | 4 +-- werkzeuge/keytest.py | 4 +-- werkzeuge/mcp_aufraeumen.py | 4 +-- werkzeuge/mcp_calls.py | 4 +-- werkzeuge/mcp_probe.py | 4 +-- werkzeuge/mcp_tisch.py | 4 +-- werkzeuge/messung.py | 4 +-- werkzeuge/messung_eingabe.py | 1 + werkzeuge/probe.py | 4 +-- werkzeuge/shot.py | 4 +-- 127 files changed, 273 insertions(+), 183 deletions(-) rename {hand => client}/pipe.py (100%) rename {hand => client}/umgebung.py (100%) diff --git a/betrieb/regie.py b/betrieb/regie.py index 2b31725b..97cae1de 100644 --- a/betrieb/regie.py +++ b/betrieb/regie.py @@ -22,6 +22,7 @@ import time HIER = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(HIER), "hand")) +sys.path.insert(0, os.path.join(os.path.dirname(HIER), "client")) import zeiger # noqa: E402 diff --git a/betrieb/runner.py b/betrieb/runner.py index 22e7396d..9471daa1 100644 --- a/betrieb/runner.py +++ b/betrieb/runner.py @@ -64,10 +64,10 @@ POKERFREAK_RATHOLING=1, nach grossem Gewinn. Zwei Fenster auf denselben Raum: da """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/betrieb/statistik.py b/betrieb/statistik.py index a62a3a48..e439fca2 100644 --- a/betrieb/statistik.py +++ b/betrieb/statistik.py @@ -22,10 +22,10 @@ Ereignisarten, die `kennzahlen` versteht: "sitzung_start"/"sitzung_ende" (Paar j """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/betrieb/zuschauer_lauf.py b/betrieb/zuschauer_lauf.py index c55a0050..1aec23e9 100644 --- a/betrieb/zuschauer_lauf.py +++ b/betrieb/zuschauer_lauf.py @@ -13,7 +13,7 @@ import time BASE = os.path.dirname(os.path.abspath(__file__)) WURZEL = os.path.dirname(BASE) -for _u in ("sicht", "lesen", "entscheiden", "hand"): +for _u in ("sicht", "lesen", "entscheiden", "hand", "client"): _q = os.path.join(WURZEL, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/hand/pipe.py b/client/pipe.py similarity index 100% rename from hand/pipe.py rename to client/pipe.py diff --git a/hand/umgebung.py b/client/umgebung.py similarity index 100% rename from hand/umgebung.py rename to client/umgebung.py diff --git a/entscheiden/decide.py b/entscheiden/decide.py index 2a945332..c34ce0b2 100644 --- a/entscheiden/decide.py +++ b/entscheiden/decide.py @@ -5,10 +5,10 @@ """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/act.py b/hand/act.py index c56647b4..29695b5a 100644 --- a/hand/act.py +++ b/hand/act.py @@ -11,10 +11,10 @@ Sicherungen: """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/befehle.py b/hand/befehle.py index b05eec8d..5ba3406c 100644 --- a/hand/befehle.py +++ b/hand/befehle.py @@ -17,9 +17,9 @@ import sys import time _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): _q = os.path.join(_w, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/hand/beitritt.py b/hand/beitritt.py index f2b68f36..1b53343e 100644 --- a/hand/beitritt.py +++ b/hand/beitritt.py @@ -28,6 +28,14 @@ import json import os import time +# client/ ist die Naht (Adresse und Sockets): unabhaengig vom Aufrufer auffindbar +import sys +_wurzel = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +for _u in ("client", "hand"): + _c = os.path.join(_wurzel, _u) + if os.path.isdir(_c) and _c not in sys.path: + sys.path.append(_c) + import pipe # Was der Client in `roomProperties` selbst schickt (aus der Log-Zeile) - und was die API dafuer diff --git a/hand/click.py b/hand/click.py index 669270d1..84bf511d 100644 --- a/hand/click.py +++ b/hand/click.py @@ -13,10 +13,10 @@ macht also nichts. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/denkzeit.py b/hand/denkzeit.py index e37190a5..74abe1d5 100644 --- a/hand/denkzeit.py +++ b/hand/denkzeit.py @@ -20,10 +20,10 @@ Ohne Band (`band=None`) gilt der alte Aufbau: """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/dialog.py b/hand/dialog.py index 3cdc9fb1..39a35fbc 100644 --- a/hand/dialog.py +++ b/hand/dialog.py @@ -28,10 +28,10 @@ Schließen - erst der generische Weg, dann die Stelle: """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "hand", "betrieb"): +for _u in ("lesen", "hand", "client", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/fenster.py b/hand/fenster.py index 099a34f3..62e1b38d 100644 --- a/hand/fenster.py +++ b/hand/fenster.py @@ -15,10 +15,10 @@ COINPOKER_KLON_GLEICHE_TITEL=1 auch der Titel genau "CoinPoker" - ohne Nummer, a """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/foto.py b/hand/foto.py index fc39ef6a..ea15fa19 100644 --- a/hand/foto.py +++ b/hand/foto.py @@ -9,10 +9,10 @@ Regionsaufnahmen zeigen, was vorne liegt. Über die Fensterkennung holt import ctypes import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/hudquelle.py b/hand/hudquelle.py index 1800a4a3..797347ec 100644 --- a/hand/hudquelle.py +++ b/hand/hudquelle.py @@ -23,9 +23,9 @@ import threading import time _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): _q = os.path.join(_w, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/hand/kanal.py b/hand/kanal.py index 8367e7d5..9aee8664 100644 --- a/hand/kanal.py +++ b/hand/kanal.py @@ -23,11 +23,12 @@ import sys import time _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) if _w not in sys.path: sys.path.insert(0, _w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import pipe diff --git a/hand/klonmaus.py b/hand/klonmaus.py index a97a2c32..2766b555 100644 --- a/hand/klonmaus.py +++ b/hand/klonmaus.py @@ -21,10 +21,10 @@ bewegen und klicken (Sperre je Seite). """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/notaus.py b/hand/notaus.py index 051d1aa7..7f71cfe6 100644 --- a/hand/notaus.py +++ b/hand/notaus.py @@ -8,7 +8,7 @@ import json import os _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w diff --git a/hand/press.py b/hand/press.py index 04f3268d..b1854cda 100644 --- a/hand/press.py +++ b/hand/press.py @@ -7,10 +7,10 @@ """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/sitzen.py b/hand/sitzen.py index c9001ec6..9dd0fbaa 100644 --- a/hand/sitzen.py +++ b/hand/sitzen.py @@ -39,10 +39,10 @@ vermessen, Guthaben unter Min) heisst aussetzen - mit Grund. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/stellen.py b/hand/stellen.py index 03df0d04..ba9dd30c 100644 --- a/hand/stellen.py +++ b/hand/stellen.py @@ -16,9 +16,9 @@ import os as _os import sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): _q = _os.path.join(_w, _u) if _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/hand/tasten.py b/hand/tasten.py index b608ca6e..312ed223 100644 --- a/hand/tasten.py +++ b/hand/tasten.py @@ -19,11 +19,12 @@ import sys import time _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) if _w not in sys.path: sys.path.insert(0, _w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import click # noqa: E402 (Fenster nach vorn, CGEvent-Zugang) diff --git a/korpus/abgleich.py b/korpus/abgleich.py index c4ebe805..7393b70b 100644 --- a/korpus/abgleich.py +++ b/korpus/abgleich.py @@ -9,10 +9,10 @@ dasselbe sagen. Null Toleranz: Bewertung ist reine Bestimmung. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/korpus/durchlauf.py b/korpus/durchlauf.py index f399e2d2..594cc6e0 100644 --- a/korpus/durchlauf.py +++ b/korpus/durchlauf.py @@ -30,7 +30,7 @@ import re import sys WURZEL = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = os.path.join(WURZEL, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.insert(0, _q) diff --git a/korpus/korpus.py b/korpus/korpus.py index d5df0bfb..f56288e5 100644 --- a/korpus/korpus.py +++ b/korpus/korpus.py @@ -9,10 +9,10 @@ Bytes an eine Kopie im Ordner korpus/ und merkt sich den Stand. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lesen/ergebnis.py b/lesen/ergebnis.py index 2e67bca7..e1c7b666 100644 --- a/lesen/ergebnis.py +++ b/lesen/ergebnis.py @@ -39,10 +39,10 @@ hoechsten Einsatz der Strasse uebersteigt). """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lesen/formats.py b/lesen/formats.py index 097950ce..764be0d2 100644 --- a/lesen/formats.py +++ b/lesen/formats.py @@ -8,10 +8,10 @@ Bedenkzeit, Aktionsmenü, Sonderfälle. Grundlage für die Reihenfolge des Baus. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lesen/observe.py b/lesen/observe.py index 8c6abe3a..6c25fb58 100644 --- a/lesen/observe.py +++ b/lesen/observe.py @@ -8,10 +8,10 @@ Fasst nichts an: kein Klick, keine Verbindung, nur die Logdatei des Clients. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lesen/spot_from_log.py b/lesen/spot_from_log.py index f9c9c7cf..0d09f38c 100644 --- a/lesen/spot_from_log.py +++ b/lesen/spot_from_log.py @@ -119,10 +119,10 @@ Turnier (Spezifikation: tests/turnier_anfrage_spec.py, Lage: lesen/turnier.py): """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lesen/turnier.py b/lesen/turnier.py index 94e3ba14..762b5b45 100644 --- a/lesen/turnier.py +++ b/lesen/turnier.py @@ -69,10 +69,10 @@ Unklar heisst None - nie geraten. `fehlend` nennt die Luecken. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/lobby/auswahl.py b/lobby/auswahl.py index 74d96818..01e5555f 100644 --- a/lobby/auswahl.py +++ b/lobby/auswahl.py @@ -33,7 +33,7 @@ import os import sys _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "lesen")) diff --git a/mcp/debug.py b/mcp/debug.py index acd5235d..7091217b 100644 --- a/mcp/debug.py +++ b/mcp/debug.py @@ -5,10 +5,18 @@ Hängt an jede MCP-Antwort den Rohzustand (Log-Zeilen, Fenster, Ports, letzte En import json import os +# client/ ist die Naht (Adresse und Sockets): unabhaengig vom Aufrufer auffindbar +import sys +_wurzel = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +for _u in ("client", "hand"): + _c = os.path.join(_wurzel, _u) + if os.path.isdir(_c) and _c not in sys.path: + sys.path.append(_c) + import umgebung _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w diff --git a/mcp/diagnose.py b/mcp/diagnose.py index 22c1b148..ee45141c 100644 --- a/mcp/diagnose.py +++ b/mcp/diagnose.py @@ -14,10 +14,10 @@ import time import urllib.request _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mcp"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mcp"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.append(_q) diff --git a/mcp/lobby_adapter.py b/mcp/lobby_adapter.py index 56114d6c..c466c875 100644 --- a/mcp/lobby_adapter.py +++ b/mcp/lobby_adapter.py @@ -11,7 +11,7 @@ import subprocess import time _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w diff --git a/mcp/lobby_heilung.py b/mcp/lobby_heilung.py index 232e7b21..e30b0099 100644 --- a/mcp/lobby_heilung.py +++ b/mcp/lobby_heilung.py @@ -22,7 +22,7 @@ import sys import time _w = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -for _u in ("mcp", "hand"): +for _u in ("mcp", "hand", "client"): _q = os.path.join(_w, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/mcp/server.py b/mcp/server.py index 10dc8753..fd05169f 100644 --- a/mcp/server.py +++ b/mcp/server.py @@ -18,10 +18,10 @@ import time from typing import Optional _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mcp"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mcp"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.append(_q) diff --git a/mcp/stopp.py b/mcp/stopp.py index 726bdf42..ce6c22f7 100644 --- a/mcp/stopp.py +++ b/mcp/stopp.py @@ -6,12 +6,13 @@ und verhindert Klick-Aktionen bei aktivem Not-Aus. import os _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w import sys sys.path.insert(0, os.path.join(WURZEL, "hand")) +sys.path.insert(0, os.path.join(WURZEL, "client")) import notaus # noqa: E402 eine Quelle für die Stopp-Dateien STOPP_PFADE = notaus.PFADE diff --git a/mock/bruecke.py b/mock/bruecke.py index 86d9e78f..08703b73 100644 --- a/mock/bruecke.py +++ b/mock/bruecke.py @@ -41,6 +41,12 @@ for _p in (_W, os.path.join(_W, "hand")): if _p not in sys.path: sys.path.insert(0, _p) +# client/ ist die Naht (Adresse und Sockets): unabhaengig vom Aufrufer auffindbar +_wurzel = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +for _u in ("client", "hand"): + _c = os.path.join(_wurzel, _u) + if os.path.isdir(_c) and _c not in sys.path: + sys.path.append(_c) import pipe TOKEN = "klon-fbtoken" diff --git a/mock/start.py b/mock/start.py index f11be02c..aa11e14f 100644 --- a/mock/start.py +++ b/mock/start.py @@ -58,6 +58,7 @@ import urllib.request HIER = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, HIER) sys.path.insert(1, os.path.join(os.path.dirname(HIER), "hand")) +sys.path.insert(0, os.path.join(os.path.dirname(HIER), "client")) import cdp import lagen diff --git a/mock/vorlage.py b/mock/vorlage.py index 9f2b8d4d..8990a164 100644 --- a/mock/vorlage.py +++ b/mock/vorlage.py @@ -13,10 +13,10 @@ import subprocess import sys _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lobby", "lesen", "hand"): +for _u in ("lobby", "lesen", "hand", "client"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.insert(0, _q) diff --git a/sicht/ansicht.py b/sicht/ansicht.py index 54aaf6a6..8bd53e1c 100644 --- a/sicht/ansicht.py +++ b/sicht/ansicht.py @@ -16,9 +16,9 @@ import sys import time _w = os.path.dirname(os.path.abspath(__file__)) -while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "hand")): +while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("lesen", "entscheiden", "hand", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "betrieb"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.append(_q) diff --git a/sicht/quellen.py b/sicht/quellen.py index c8b166de..7fe2719f 100644 --- a/sicht/quellen.py +++ b/sicht/quellen.py @@ -30,10 +30,10 @@ import threading import time _w = os.path.dirname(os.path.abspath(__file__)) -while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "hand")): +while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "betrieb", "mcp", "lobby"): +for _u in ("lesen", "entscheiden", "hand", "client", "betrieb", "mcp", "lobby"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.append(_q) diff --git a/sicht/steuern.py b/sicht/steuern.py index c29d09ff..f613443b 100644 --- a/sicht/steuern.py +++ b/sicht/steuern.py @@ -23,7 +23,7 @@ import time HIER = os.path.dirname(os.path.abspath(__file__)) WURZEL = os.path.dirname(HIER) -for _u in ("hand",): +for _u in ("hand", "client",): _q = os.path.join(WURZEL, _u) if _q not in sys.path: sys.path.append(_q) diff --git a/sicht/tische.py b/sicht/tische.py index a8bddf67..4ae297a1 100644 --- a/sicht/tische.py +++ b/sicht/tische.py @@ -22,6 +22,12 @@ WURZEL = os.path.dirname(HIER) if os.path.join(WURZEL, "hand") not in sys.path: sys.path.append(os.path.join(WURZEL, "hand")) +# client/ ist die Naht (Adresse und Sockets): unabhaengig vom Aufrufer auffindbar +_wurzel = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +for _u in ("client", "hand"): + _c = os.path.join(_wurzel, _u) + if os.path.isdir(_c) and _c not in sys.path: + sys.path.append(_c) import umgebung # noqa: E402 COCKPIT = os.path.join(umgebung.treffpunkt(), "cockpit.json") # Naht: das Panel liest das # Rahmen des Cockpits (das Panel der Cockpit-App) LEISTE = 460 # so breit bleibt rechts frei, wenn die Leiste ihren Rahmen nicht meldet diff --git a/tests/antworten_spec.py b/tests/antworten_spec.py index 2959bd15..84fa097b 100644 --- a/tests/antworten_spec.py +++ b/tests/antworten_spec.py @@ -6,7 +6,7 @@ Namensform. Damit bekommt ein gescheiterter Klick einen Grund statt "hat nicht g """ import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "hand")) import antworten diff --git a/tests/auswahl_spec.py b/tests/auswahl_spec.py index 5d8b11ef..9119acb3 100644 --- a/tests/auswahl_spec.py +++ b/tests/auswahl_spec.py @@ -8,7 +8,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "lobby")) diff --git a/tests/befehle_spec.py b/tests/befehle_spec.py index 2a40e238..513f646d 100644 --- a/tests/befehle_spec.py +++ b/tests/befehle_spec.py @@ -11,9 +11,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import befehle diff --git a/tests/befund_kette_spec.py b/tests/befund_kette_spec.py index 3acc2b8e..b1b8d8b1 100644 --- a/tests/befund_kette_spec.py +++ b/tests/befund_kette_spec.py @@ -19,7 +19,7 @@ _hier = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, _hier) from klonlauf import WURZEL, Klonlauf, warte # noqa: E402 -for _u in ("betrieb", "hand"): +for _u in ("betrieb", "hand", "client"): sys.path.insert(0, os.path.join(WURZEL, _u)) import cdp # noqa: E402 import fenster # noqa: E402 diff --git a/tests/befund_spec.py b/tests/befund_spec.py index 0fc126a5..497d4d21 100644 --- a/tests/befund_spec.py +++ b/tests/befund_spec.py @@ -20,7 +20,7 @@ from unittest import mock _w = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) HIER = os.path.join(_w, "tests") -for _u in ("lesen", "entscheiden", "lobby", "korpus", "betrieb", "hand"): +for _u in ("lesen", "entscheiden", "lobby", "korpus", "betrieb", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) sys.path.append(os.path.join(_w, "mock")) sys.path.insert(0, HIER) diff --git a/tests/bild_vorlagen_spec.py b/tests/bild_vorlagen_spec.py index efd48bb0..bbc679d4 100644 --- a/tests/bild_vorlagen_spec.py +++ b/tests/bild_vorlagen_spec.py @@ -16,9 +16,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): _q = os.path.join(_w, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/tests/bruecke_kette_spec.py b/tests/bruecke_kette_spec.py index b2611f9e..231623a9 100644 --- a/tests/bruecke_kette_spec.py +++ b/tests/bruecke_kette_spec.py @@ -27,6 +27,7 @@ os.environ["POKERFREAK_PIPE_TMP"] = TMP from klonlauf import Klonlauf, warte # noqa: E402 sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "hand")) +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "client")) import kanal # noqa: E402 import pipe # noqa: E402 diff --git a/tests/denkzeit_spec.py b/tests/denkzeit_spec.py index 13f5ffa4..02bf4359 100644 --- a/tests/denkzeit_spec.py +++ b/tests/denkzeit_spec.py @@ -9,10 +9,10 @@ gelegentliche lange Pause, Wandern über die Sitzung, Uhr-Grenze, Seed. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/tests/dialog_spec.py b/tests/dialog_spec.py index 00ea57d5..348abc6f 100644 --- a/tests/dialog_spec.py +++ b/tests/dialog_spec.py @@ -9,7 +9,7 @@ import zlib W = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.environ.setdefault("COINPOKER_MOCK", "1") # act laedt dann klonmaus statt click.py (ohne Mac) -for _u in ("hand", "lesen", "betrieb"): +for _u in ("hand", "client", "lesen", "betrieb"): sys.path.insert(0, os.path.join(W, _u)) import tempfile # noqa: E402 diff --git a/tests/echtheit_klon_spec.py b/tests/echtheit_klon_spec.py index 238e0710..cd81f10a 100644 --- a/tests/echtheit_klon_spec.py +++ b/tests/echtheit_klon_spec.py @@ -36,7 +36,7 @@ import urllib.request _w = os.path.dirname(os.path.abspath(__file__)) while _w != "/" and not os.path.isdir(os.path.join(_w, "mock")): _w = os.path.dirname(_w) -for _u in ("lesen", "hand", "mock"): +for _u in ("lesen", "hand", "client", "mock"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.insert(0, _q) diff --git a/tests/eingabe_spec.py b/tests/eingabe_spec.py index 7a8aab0b..b8686c31 100644 --- a/tests/eingabe_spec.py +++ b/tests/eingabe_spec.py @@ -12,9 +12,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "betrieb", "mcp", "lobby", "lesen"): +for _u in ("hand", "client", "betrieb", "mcp", "lobby", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) import eingabe diff --git a/tests/evchop_echt_spec.py b/tests/evchop_echt_spec.py index e482a183..bd3ff11e 100644 --- a/tests/evchop_echt_spec.py +++ b/tests/evchop_echt_spec.py @@ -18,7 +18,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "lesen")) diff --git a/tests/evchop_regel_spec.py b/tests/evchop_regel_spec.py index a8517f5e..5b12daf6 100644 --- a/tests/evchop_regel_spec.py +++ b/tests/evchop_regel_spec.py @@ -16,7 +16,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")) diff --git a/tests/fenster_mock_spec.py b/tests/fenster_mock_spec.py index 86f7ba8c..bb3b1ad5 100644 --- a/tests/fenster_mock_spec.py +++ b/tests/fenster_mock_spec.py @@ -12,9 +12,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand",): +for _u in ("hand", "client",): _q = os.path.join(_w, _u) if os.path.isdir(_q): sys.path.append(_q) diff --git a/tests/fraud_spec.py b/tests/fraud_spec.py index b4f1c08e..0ab9b0fb 100644 --- a/tests/fraud_spec.py +++ b/tests/fraud_spec.py @@ -2,7 +2,7 @@ """Spezifikation: Konto- und Raumstatus aus Kommandozeile und Log (hand/fraud.py).""" import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "hand")) import fraud diff --git a/tests/funde_spec.py b/tests/funde_spec.py index 87416720..a049d267 100644 --- a/tests/funde_spec.py +++ b/tests/funde_spec.py @@ -2,7 +2,7 @@ """Spezifikation: Leser aus den Code-Funden (Tischregeln, Marken, EV-Chop, Einstellungen).""" import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")) import einstellungen, evchop, tags, tischregeln diff --git a/tests/gedenkzeit_spec.py b/tests/gedenkzeit_spec.py index d56c6283..c181cb73 100644 --- a/tests/gedenkzeit_spec.py +++ b/tests/gedenkzeit_spec.py @@ -15,7 +15,7 @@ import sys import unittest _u = os.path.dirname(os.path.abspath(__file__)) -while _u != "/" and not os.path.isdir(os.path.join(_u, "hand")): +while _u != "/" and not os.path.isdir(os.path.join(_u, "lesen")): _u = os.path.dirname(_u) for p in (os.path.join(_u, "lesen"), os.path.join(_u, "hand")): sys.path.insert(0, p) diff --git a/tests/geld_spec.py b/tests/geld_spec.py index 6b2ddc20..6c65b652 100644 --- a/tests/geld_spec.py +++ b/tests/geld_spec.py @@ -15,7 +15,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "lesen")) diff --git a/tests/geldplan_spec.py b/tests/geldplan_spec.py index f908b754..af1f3492 100644 --- a/tests/geldplan_spec.py +++ b/tests/geldplan_spec.py @@ -18,7 +18,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) sys.path.insert(0, os.path.join(_w, "lesen")) diff --git a/tests/handbewertung_spec.py b/tests/handbewertung_spec.py index bf9696af..f7c469ea 100644 --- a/tests/handbewertung_spec.py +++ b/tests/handbewertung_spec.py @@ -18,7 +18,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")) diff --git a/tests/hudquelle_spec.py b/tests/hudquelle_spec.py index 1d5cee55..84f349d4 100644 --- a/tests/hudquelle_spec.py +++ b/tests/hudquelle_spec.py @@ -9,9 +9,9 @@ import time import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) import hudquelle diff --git a/tests/invarianten_spec.py b/tests/invarianten_spec.py index cc2435a6..61b289c6 100644 --- a/tests/invarianten_spec.py +++ b/tests/invarianten_spec.py @@ -20,7 +20,7 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) diff --git a/tests/kanal_spec.py b/tests/kanal_spec.py index bb9d3fbe..1e33e0e0 100644 --- a/tests/kanal_spec.py +++ b/tests/kanal_spec.py @@ -11,9 +11,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import kanal diff --git a/tests/kern_frisch_spec.py b/tests/kern_frisch_spec.py index 9df711e3..533fcac2 100644 --- a/tests/kern_frisch_spec.py +++ b/tests/kern_frisch_spec.py @@ -13,9 +13,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("entscheiden", "hand"): +for _u in ("entscheiden", "hand", "client"): _q = os.path.join(_w, _u) if os.path.isdir(_q): sys.path.append(_q) diff --git a/tests/klick_ziel_spec.py b/tests/klick_ziel_spec.py index 755414f9..12842a71 100644 --- a/tests/klick_ziel_spec.py +++ b/tests/klick_ziel_spec.py @@ -14,9 +14,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) import click diff --git a/tests/klickweg_spec.py b/tests/klickweg_spec.py index ae2583a7..a426ac3b 100644 --- a/tests/klickweg_spec.py +++ b/tests/klickweg_spec.py @@ -13,6 +13,7 @@ import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "hand")) +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "client")) import click diff --git a/tests/klonlauf.py b/tests/klonlauf.py index 2752a319..a2e3a899 100644 --- a/tests/klonlauf.py +++ b/tests/klonlauf.py @@ -25,7 +25,7 @@ import urllib.parse import urllib.request WURZEL = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -for _u in ("betrieb", "mcp", "mock", "hand", "lesen", "lobby"): +for _u in ("betrieb", "mcp", "mock", "hand", "client", "lesen", "lobby"): _q = os.path.join(WURZEL, _u) if _q not in sys.path: sys.path.insert(0, _q) diff --git a/tests/klonmaus_spec.py b/tests/klonmaus_spec.py index 61e38cb3..5497b757 100644 --- a/tests/klonmaus_spec.py +++ b/tests/klonmaus_spec.py @@ -14,7 +14,7 @@ import sys import unittest _w = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -for _u in ("hand", "mock"): +for _u in ("hand", "client", "mock"): sys.path.insert(0, os.path.join(_w, _u)) import klonmaus diff --git a/tests/laeufer_sitzen_spec.py b/tests/laeufer_sitzen_spec.py index 9c4469a0..36f400bf 100644 --- a/tests/laeufer_sitzen_spec.py +++ b/tests/laeufer_sitzen_spec.py @@ -36,9 +36,9 @@ import types import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen", "betrieb", "entscheiden"): +for _u in ("hand", "client", "lesen", "betrieb", "entscheiden"): sys.path.insert(0, os.path.join(_w, _u)) TEXT = gzip.open(os.path.join(_w, "archiv", "mitschrieb", "main.6.log.gz"), "rt", diff --git a/tests/lagen_spec.py b/tests/lagen_spec.py index d9f41dd0..ab3ab989 100644 --- a/tests/lagen_spec.py +++ b/tests/lagen_spec.py @@ -29,9 +29,9 @@ import unittest from unittest import mock _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("mock", "lesen", "entscheiden", "hand"): +for _u in ("mock", "lesen", "entscheiden", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import decide diff --git a/tests/live_position_spec.py b/tests/live_position_spec.py index 789bbaf2..f6384894 100644 --- a/tests/live_position_spec.py +++ b/tests/live_position_spec.py @@ -29,10 +29,10 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand"): +for _u in ("lesen", "entscheiden", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import decide diff --git a/tests/lobby_heilung_spec.py b/tests/lobby_heilung_spec.py index 24e41835..5b725844 100644 --- a/tests/lobby_heilung_spec.py +++ b/tests/lobby_heilung_spec.py @@ -12,7 +12,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "mcp")) diff --git a/tests/lobby_warten_spec.py b/tests/lobby_warten_spec.py index d37bfb24..9c52f32b 100644 --- a/tests/lobby_warten_spec.py +++ b/tests/lobby_warten_spec.py @@ -18,9 +18,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("mcp", "hand", "lesen", "lobby"): +for _u in ("mcp", "hand", "client", "lesen", "lobby"): sys.path.insert(0, os.path.join(_w, _u)) import lobby_adapter as la diff --git a/tests/maus_spec.py b/tests/maus_spec.py index f8055d7f..6a0bc602 100644 --- a/tests/maus_spec.py +++ b/tests/maus_spec.py @@ -15,9 +15,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import maus diff --git a/tests/mcp_server_spec.py b/tests/mcp_server_spec.py index 48116028..acb1f10b 100644 --- a/tests/mcp_server_spec.py +++ b/tests/mcp_server_spec.py @@ -16,10 +16,10 @@ import unittest from unittest.mock import MagicMock, patch _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mcp"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mcp"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.append(_q) diff --git a/tests/mock_spec.py b/tests/mock_spec.py index 43828858..016607c6 100644 --- a/tests/mock_spec.py +++ b/tests/mock_spec.py @@ -60,10 +60,10 @@ import urllib.parse import urllib.request _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("hand", "lesen", "mcp", "mock"): +for _u in ("hand", "client", "lesen", "mcp", "mock"): _q = os.path.join(_w, _u) if os.path.isdir(_q): sys.path.append(_q) diff --git a/tests/nachsehen_spec.py b/tests/nachsehen_spec.py index d7cce01f..b955e61b 100644 --- a/tests/nachsehen_spec.py +++ b/tests/nachsehen_spec.py @@ -13,10 +13,10 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("hand", "lesen", "betrieb"): +for _u in ("hand", "client", "lesen", "betrieb"): _q = os.path.join(_w, _u) if os.path.isdir(_q): sys.path.append(_q) diff --git a/tests/notaus_spec.py b/tests/notaus_spec.py index 94381b5f..5785b7ab 100644 --- a/tests/notaus_spec.py +++ b/tests/notaus_spec.py @@ -20,9 +20,9 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen", "mcp"): +for _u in ("hand", "client", "lesen", "mcp"): sys.path.insert(0, os.path.join(_w, _u)) import act diff --git a/tests/notaus_waechter_spec.py b/tests/notaus_waechter_spec.py index 9c2e31f6..c150b914 100644 --- a/tests/notaus_waechter_spec.py +++ b/tests/notaus_waechter_spec.py @@ -18,9 +18,10 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import notaus diff --git a/tests/pipe_spec.py b/tests/pipe_spec.py index e4e4f153..caaba46d 100644 --- a/tests/pipe_spec.py +++ b/tests/pipe_spec.py @@ -16,9 +16,10 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import pipe diff --git a/tests/profil_dialog_spec.py b/tests/profil_dialog_spec.py index d0c72b83..6e1e45dd 100644 --- a/tests/profil_dialog_spec.py +++ b/tests/profil_dialog_spec.py @@ -25,7 +25,7 @@ import urllib.request _w = os.path.dirname(os.path.abspath(__file__)) while _w != "/" and not os.path.isdir(os.path.join(_w, "mock")): _w = os.path.dirname(_w) -for _u in ("lesen", "hand", "mock"): +for _u in ("lesen", "hand", "client", "mock"): _q = os.path.join(_w, _u) if os.path.isdir(_q) and _q not in sys.path: sys.path.insert(0, _q) diff --git a/tests/rake_spec.py b/tests/rake_spec.py index 3ce93b0c..8a2b4cbb 100644 --- a/tests/rake_spec.py +++ b/tests/rake_spec.py @@ -2,7 +2,7 @@ """Spezifikation: gezahlter Rake aus dem Log (lesen/rake.py).""" import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")) import rake diff --git a/tests/rakeback_spec.py b/tests/rakeback_spec.py index 16671a37..15e255d2 100644 --- a/tests/rakeback_spec.py +++ b/tests/rakeback_spec.py @@ -2,7 +2,7 @@ """Spezifikation: Rakeback und Netto (lesen/geld.py) sowie schwarze Stunden (hand/fraud.py).""" import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")); sys.path.append(os.path.join(_w, "hand")) import fraud, geld diff --git a/tests/schnittstelle_spec.py b/tests/schnittstelle_spec.py index 7876ee56..a85d05fa 100644 --- a/tests/schnittstelle_spec.py +++ b/tests/schnittstelle_spec.py @@ -11,10 +11,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w -for _u in ("hand", "lesen", "betrieb", "sicht", "mock"): +for _u in ("hand", "client", "lesen", "betrieb", "sicht", "mock"): _q = os.path.join(WURZEL, _u) if _q not in sys.path: sys.path.insert(0, _q) @@ -113,8 +113,9 @@ class Befehl(unittest.TestCase): """5. Die Welt startet die Engine - als Kommando, nicht als Pfad.""" def test_engine_ist_ein_kommando(self): + # Die Vorgabe zeigt in den eigenen Baum; in der Welt zeigt POKERFREAK_ENGINE daneben. self.assertIn("runner.py", steuern.ENGINE) - self.assertTrue(os.path.exists(steuern.ENGINE.split()[-1]), steuern.ENGINE) + self.assertEqual(steuern.engine_befehl()[-1], "--act") def test_engine_ist_uebersteuerbar(self): alt = os.environ.get("POKERFREAK_ENGINE") diff --git a/tests/sicht_ansicht_spec.py b/tests/sicht_ansicht_spec.py index 5966db5e..72b03ff5 100644 --- a/tests/sicht_ansicht_spec.py +++ b/tests/sicht_ansicht_spec.py @@ -16,7 +16,7 @@ import types import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "hand")): +while os.path.dirname(_w) != _w and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "sicht")) diff --git a/tests/sicht_instanz_spec.py b/tests/sicht_instanz_spec.py index c96e11bb..90f40f24 100644 --- a/tests/sicht_instanz_spec.py +++ b/tests/sicht_instanz_spec.py @@ -20,7 +20,7 @@ import time import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "sicht")) sys.path.insert(0, os.path.join(_w, "betrieb")) diff --git a/tests/sicht_leiste_spec.py b/tests/sicht_leiste_spec.py index 7d68f2a6..435ce4a0 100644 --- a/tests/sicht_leiste_spec.py +++ b/tests/sicht_leiste_spec.py @@ -10,7 +10,7 @@ import unittest W = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.environ.setdefault("COINPOKER_MOCK", "1") # act laedt dann klonmaus statt click.py -for _u in ("sicht", "hand", "lesen", "betrieb"): +for _u in ("sicht", "hand", "client", "lesen", "betrieb"): sys.path.insert(0, os.path.join(W, _u)) import act diff --git a/tests/sicht_modus_spec.py b/tests/sicht_modus_spec.py index a3cdb880..e289037c 100644 --- a/tests/sicht_modus_spec.py +++ b/tests/sicht_modus_spec.py @@ -19,9 +19,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("sicht", "lesen", "betrieb", "hand"): +for _u in ("sicht", "lesen", "betrieb", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import ansicht diff --git a/tests/sicht_steuern_spec.py b/tests/sicht_steuern_spec.py index c1354d52..0e1524a4 100644 --- a/tests/sicht_steuern_spec.py +++ b/tests/sicht_steuern_spec.py @@ -15,7 +15,7 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) for _u in ("sicht", "betrieb", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) diff --git a/tests/sitzen_spec.py b/tests/sitzen_spec.py index 1294a3ee..1173c384 100644 --- a/tests/sitzen_spec.py +++ b/tests/sitzen_spec.py @@ -12,9 +12,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen"): +for _u in ("hand", "client", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) import geld diff --git a/tests/sperre_spec.py b/tests/sperre_spec.py index 080024dd..29a12049 100644 --- a/tests/sperre_spec.py +++ b/tests/sperre_spec.py @@ -16,7 +16,7 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) diff --git a/tests/spielplan_formate_spec.py b/tests/spielplan_formate_spec.py index ce4b4a18..4a766a01 100644 --- a/tests/spielplan_formate_spec.py +++ b/tests/spielplan_formate_spec.py @@ -17,9 +17,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("betrieb", "lesen", "hand"): +for _u in ("betrieb", "lesen", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import formate diff --git a/tests/spielplan_spec.py b/tests/spielplan_spec.py index 2a1a85e3..105f3ae1 100644 --- a/tests/spielplan_spec.py +++ b/tests/spielplan_spec.py @@ -18,7 +18,7 @@ import tempfile import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) sys.path.insert(0, os.path.join(_w, "lesen")) diff --git a/tests/stellen_spec.py b/tests/stellen_spec.py index 538b46b8..924013c9 100644 --- a/tests/stellen_spec.py +++ b/tests/stellen_spec.py @@ -12,9 +12,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "mcp"): +for _u in ("hand", "client", "mcp"): sys.path.insert(0, os.path.join(_w, _u)) import dialog diff --git a/tests/strom_spec.py b/tests/strom_spec.py index 66e8a007..0347acd4 100644 --- a/tests/strom_spec.py +++ b/tests/strom_spec.py @@ -24,9 +24,9 @@ import types import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("hand", "lesen", "betrieb", "entscheiden"): +for _u in ("hand", "client", "lesen", "betrieb", "entscheiden"): sys.path.insert(0, os.path.join(_w, _u)) ARCHIV = os.path.join(_w, "archiv", "mitschrieb", "main.6.log.gz") diff --git a/tests/tasten_spec.py b/tests/tasten_spec.py index a0a7bf73..ce6a169c 100644 --- a/tests/tasten_spec.py +++ b/tests/tasten_spec.py @@ -6,9 +6,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import tasten diff --git a/tests/tisch_schliessen_spec.py b/tests/tisch_schliessen_spec.py index 87ddd8d0..e13df913 100644 --- a/tests/tisch_schliessen_spec.py +++ b/tests/tisch_schliessen_spec.py @@ -18,7 +18,7 @@ import unittest _w = os.path.dirname(os.path.abspath(__file__)) while _w != "/" and not os.path.isdir(os.path.join(_w, "sicht")): _w = os.path.dirname(_w) -for _u in ("sicht", "hand", "lesen", "betrieb", "mcp"): +for _u in ("sicht", "hand", "client", "lesen", "betrieb", "mcp"): sys.path.insert(0, os.path.join(_w, _u)) import steuern diff --git a/tests/tischlage_spec.py b/tests/tischlage_spec.py index dbe2caab..3ca66f25 100644 --- a/tests/tischlage_spec.py +++ b/tests/tischlage_spec.py @@ -19,7 +19,7 @@ import types import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) diff --git a/tests/tischziel_spec.py b/tests/tischziel_spec.py index c830372a..f0846dcd 100644 --- a/tests/tischziel_spec.py +++ b/tests/tischziel_spec.py @@ -18,9 +18,9 @@ import types import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("betrieb", "lesen", "hand", "mcp"): +for _u in ("betrieb", "lesen", "hand", "client", "mcp"): sys.path.insert(0, os.path.join(_w, _u)) import formate diff --git a/tests/tischzustand_spec.py b/tests/tischzustand_spec.py index 35e9bb9d..6fd5619a 100644 --- a/tests/tischzustand_spec.py +++ b/tests/tischzustand_spec.py @@ -20,9 +20,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("betrieb", "hand", "lesen", "mock"): +for _u in ("betrieb", "hand", "client", "lesen", "mock"): sys.path.insert(0, os.path.join(_w, _u)) import tischzustand as tz diff --git a/tests/turnier_anfrage_spec.py b/tests/turnier_anfrage_spec.py index a4fe0c48..47ca7219 100644 --- a/tests/turnier_anfrage_spec.py +++ b/tests/turnier_anfrage_spec.py @@ -30,9 +30,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("lesen", "entscheiden", "hand"): +for _u in ("lesen", "entscheiden", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import decide diff --git a/tests/uebersetzung_spec.py b/tests/uebersetzung_spec.py index e82574b3..809a84b1 100644 --- a/tests/uebersetzung_spec.py +++ b/tests/uebersetzung_spec.py @@ -19,9 +19,9 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("lesen", "hand"): +for _u in ("lesen", "hand", "client"): sys.path.insert(0, os.path.join(_w, _u)) import spot_from_log diff --git a/tests/uhren_spec.py b/tests/uhren_spec.py index 1c4ea5c1..ad789c79 100644 --- a/tests/uhren_spec.py +++ b/tests/uhren_spec.py @@ -11,6 +11,7 @@ import unittest _w = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) sys.path.append(os.path.join(_w, "mock")) import logschreiber # noqa: E402 diff --git a/tests/vorn_spec.py b/tests/vorn_spec.py index e2a67b70..d841ca53 100644 --- a/tests/vorn_spec.py +++ b/tests/vorn_spec.py @@ -19,9 +19,10 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import click diff --git a/tests/vorteile_spec.py b/tests/vorteile_spec.py index 3c514fd7..3a0b09e3 100644 --- a/tests/vorteile_spec.py +++ b/tests/vorteile_spec.py @@ -2,7 +2,7 @@ """Spezifikation: Rakeback, Power-Ups und Nutzen aus dem Log (lesen/vorteile.py).""" import os, sys, unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): _w = os.path.dirname(_w) +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.append(os.path.join(_w, "lesen")) import vorteile diff --git a/tests/wiedergabe_spec.py b/tests/wiedergabe_spec.py index 796285d7..b82a50d5 100644 --- a/tests/wiedergabe_spec.py +++ b/tests/wiedergabe_spec.py @@ -20,7 +20,7 @@ import time import unittest _w = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -for _u in ("betrieb", "korpus", "lobby", "hand", "entscheiden", "lesen"): +for _u in ("betrieb", "korpus", "lobby", "hand", "client", "entscheiden", "lesen"): sys.path.insert(0, os.path.join(_w, _u)) sys.path.append(os.path.join(_w, "mock")) # hinten: mock/turnier.py verdeckt sonst lesen/turnier.py diff --git a/tests/zeiger_spec.py b/tests/zeiger_spec.py index 9c84e239..920fa2b4 100644 --- a/tests/zeiger_spec.py +++ b/tests/zeiger_spec.py @@ -15,9 +15,10 @@ import time import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "hand")) +sys.path.insert(0, os.path.join(_w, "client")) import maus import zeiger diff --git a/tests/zeitplan_spec.py b/tests/zeitplan_spec.py index b31a93b2..293d8de0 100644 --- a/tests/zeitplan_spec.py +++ b/tests/zeitplan_spec.py @@ -21,7 +21,7 @@ import sys import unittest _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) sys.path.insert(0, os.path.join(_w, "betrieb")) diff --git a/tests/zuschauer_spec.py b/tests/zuschauer_spec.py index a272de79..524daceb 100644 --- a/tests/zuschauer_spec.py +++ b/tests/zuschauer_spec.py @@ -24,9 +24,9 @@ import unittest from unittest import mock _w = os.path.dirname(os.path.abspath(__file__)) -while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")): +while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) -for _u in ("mock", "sicht", "betrieb", "lesen", "hand", "entscheiden"): +for _u in ("mock", "sicht", "betrieb", "lesen", "hand", "client", "entscheiden"): sys.path.insert(0, os.path.join(_w, _u)) import ansicht diff --git a/werkzeuge/axpress.py b/werkzeuge/axpress.py index 51413073..2b3e65d9 100644 --- a/werkzeuge/axpress.py +++ b/werkzeuge/axpress.py @@ -10,10 +10,10 @@ samt Position, wir druecken den gewaehlten. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/hof.py b/werkzeuge/hof.py index 969cb243..7011738b 100644 --- a/werkzeuge/hof.py +++ b/werkzeuge/hof.py @@ -28,10 +28,14 @@ WURZEL = os.path.dirname(HIER) sys.path.insert(0, HIER) from hof_story import STORY_TEXTE # noqa: E402 -HOF = os.path.join(os.path.dirname(WURZEL), "pokerfreak-sim") +WELT = os.environ.get("HOF_ART") == "welt" +HOF = os.path.join(os.path.dirname(WURZEL), "pokersim" if WELT else "pokerfreak-sim") +# Die Welt (pokersim): Klon, Cockpit, Ansicht, Leser, Mitschriebe. Die Engine dockt an. +WELT_ORDNER = ("mock", "mac", "sicht", "lesen", "client", "archiv", "docs") +ENGINE_ORDNER = ("hand", "betrieb", "entscheiden", "mcp", "lobby", "korpus", "src") STAND = os.path.join(WURZEL, "scratch", "hof-stand.json") -ORDNER = ("src", "lesen", "mock", "hand", "betrieb", "entscheiden", "sicht", "mac", "mcp", "korpus") +ORDNER = ("src", "client", "lesen", "mock", "hand", "betrieb", "entscheiden", "sicht", "mac", "mcp", "korpus") EINZELN = (("lobby", "auswahl.py"), ("lobby", "cdp.mjs"), ("lobby", "zustand.py"), ("mcp", "stopp.py"), ("mcp", "lobby_adapter.py")) ARCHIV = ("mitschrieb", "live", "bilder") @@ -115,7 +119,10 @@ def bericht(zeigen=True): if d not in BEKANNT or d == "tests": continue if not vorhanden(d, n): - (befund if r.startswith("archiv/") or r in STORY else code).append(f"{r}:{i}: {d}/{n}") + frei = (befund if (r.startswith("archiv/") or r in STORY) else code) + if WELT and d in ENGINE_ORDNER: + frei = befund # die gedockte Engine: Befund, nicht Fehler + frei.append(f"{r}:{i}: {d}/{n}") if zeigen: print(f"Bericht: Code {len(code)} Stellen, Befund-Texte {len(befund)} Stellen") for s in code + befund: @@ -138,6 +145,16 @@ def genannte_pruefungen(): # ---------------------------------------------------------------- bauen def kopiere_grundstock(): + if WELT: # die Welt nimmt ihre Ordner und die zwei Client-Dateien + for d in WELT_ORDNER: + ziel = os.path.join(HOF, d) + if os.path.isdir(ziel): + shutil.rmtree(ziel) + shutil.copytree(os.path.join(WURZEL, d), ziel, + ignore=shutil.ignore_patterns("__pycache__", "scratch", ".DS_Store", ".build", "build")) + kopiere(os.path.join(WURZEL, "tests", "lauf.py"), os.path.join(HOF, "tests", "lauf.py")) + kopiere(os.path.join(WURZEL, "tests", "wache", "sitecustomize.py"), os.path.join(HOF, "tests", "wache", "sitecustomize.py")) + return for d in ORDNER: ziel = os.path.join(HOF, d) if os.path.isdir(ziel): @@ -165,16 +182,41 @@ def kopiere_grundstock(): def waehle_pruefungen(): - """Die Pruefungen, die nur von dem leben, was im Hof liegt.""" + """Pruefungen, die nur von dem leben, was hier liegt. Fuer die Welt: nichts aus der Engine.""" behalten, weg = [], [] + fremd = ENGINE_ORDNER if WELT else () for n in sorted(os.listdir(os.path.join(WURZEL, "tests"))): if not n.endswith("_spec.py"): continue t = text(os.path.join(WURZEL, "tests", n)) - (weg if "klonlauf" in t or nennt_fremdes(t) else behalten).append(n) + # Die Welt waehlt nach IMPORTEN (Prosa darf die gedockte Engine nennen); der volle Hof + # waehlt nach Erwaehnungen, weil es dort keine draussen gibt. + raus = "klonlauf" in t or (any(braucht_engine(n) for n in importe(t)) if WELT + else nennt_fremdes(t)) + (weg if raus else behalten).append(n) return behalten, weg +def importe(t): + namen = set() + for m in re.finditer(r'^\s*(?:import|from)\s+([A-Za-z_][\w.]*)', t, re.M): + namen.add(m.group(1).split(".")[0]) + return namen + + +def braucht_engine(name): + """Findet die Welt dieses Modul nicht, liegt es in der gedockten Engine.""" + if os.path.exists(os.path.join(WURZEL, "tests", name + ".py")): + return False + for d in WELT_ORDNER + ("tests",): + if os.path.exists(os.path.join(WURZEL, d, name + ".py")): + return False + for d in ENGINE_ORDNER: + if os.path.exists(os.path.join(WURZEL, d, name + ".py")): + return True + return False + + def fehlende_module(aus): return sorted(set(re.findall(r"No module named '([^']+)'", aus))) diff --git a/werkzeuge/hof_story.py b/werkzeuge/hof_story.py index 1164f402..33e8f780 100644 --- a/werkzeuge/hof_story.py +++ b/werkzeuge/hof_story.py @@ -52,6 +52,8 @@ Die Cockpit-App (Swift, `mac/`) hat ihre eigenen Pruefungen - headless, ohne Fre cd mac && swift run Pruefung # die Regeln des Kerns (Fenster, Plan, Formate, Nachrichten) cd mac && swift build # baut die Huelle mit (Panel, Tasten, Serverprozess) +Die Engine wird ueber POKERFREAK_ENGINE genannt (Vorgabe: `betrieb/runner.py` im eigenen Baum). + Aufgefuellt wird dieser Baum von einem Werkzeug daneben (`werkzeuge/hof.py --bauen`); Aenderungen gehen ueber `--uebernehmen` dorthin zurueck. """ diff --git a/werkzeuge/hover.py b/werkzeuge/hover.py index e6fa9765..cb6bd1eb 100644 --- a/werkzeuge/hover.py +++ b/werkzeuge/hover.py @@ -8,10 +8,10 @@ Der Client meldet beim Überfahren selbst, was unter dem Zeiger liegt """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/keytest.py b/werkzeuge/keytest.py index 4d81eb32..bb35d325 100644 --- a/werkzeuge/keytest.py +++ b/werkzeuge/keytest.py @@ -9,10 +9,10 @@ Tastendruck angekommen und gewirkt hat. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/mcp_aufraeumen.py b/werkzeuge/mcp_aufraeumen.py index f3f39ed0..5b18f529 100644 --- a/werkzeuge/mcp_aufraeumen.py +++ b/werkzeuge/mcp_aufraeumen.py @@ -1,9 +1,9 @@ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/mcp_calls.py b/werkzeuge/mcp_calls.py index e112a60d..960a5348 100644 --- a/werkzeuge/mcp_calls.py +++ b/werkzeuge/mcp_calls.py @@ -1,9 +1,9 @@ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/mcp_probe.py b/werkzeuge/mcp_probe.py index 312d5248..e9126172 100644 --- a/werkzeuge/mcp_probe.py +++ b/werkzeuge/mcp_probe.py @@ -1,9 +1,9 @@ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/mcp_tisch.py b/werkzeuge/mcp_tisch.py index 4e0b4385..0cee4654 100644 --- a/werkzeuge/mcp_tisch.py +++ b/werkzeuge/mcp_tisch.py @@ -1,9 +1,9 @@ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/messung.py b/werkzeuge/messung.py index 86e5450c..932a6b2e 100644 --- a/werkzeuge/messung.py +++ b/werkzeuge/messung.py @@ -12,10 +12,10 @@ zusätzlich aus der Fremdzug-Probe (`probe_zuege`). """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/messung_eingabe.py b/werkzeuge/messung_eingabe.py index 7f934868..dda49212 100644 --- a/werkzeuge/messung_eingabe.py +++ b/werkzeuge/messung_eingabe.py @@ -13,6 +13,7 @@ Zeiger bewegt hat - bleibt er liegen, ist der Rechner unberuehrt. """ import ctypes, os, re, subprocess, sys, time sys.path.insert(0, "hand") +sys.path.insert(0, os.path.join(_w, "client")) import fenster from click import AS, CGPoint, MOVED, DOWN, UP AS.CGEventCreate.restype = ctypes.c_void_p; AS.CGEventCreate.argtypes = [ctypes.c_void_p] diff --git a/werkzeuge/probe.py b/werkzeuge/probe.py index fdc60e03..4c57e577 100644 --- a/werkzeuge/probe.py +++ b/werkzeuge/probe.py @@ -9,10 +9,10 @@ der Client wirklich verarbeitet. """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q) diff --git a/werkzeuge/shot.py b/werkzeuge/shot.py index 15dca18b..1982b0fc 100644 --- a/werkzeuge/shot.py +++ b/werkzeuge/shot.py @@ -5,10 +5,10 @@ """ import os as _os, sys as _sys _w = _os.path.dirname(_os.path.abspath(__file__)) -while _w != "/" and not _os.path.isdir(_os.path.join(_w, "hand")): +while _w != "/" and not _os.path.isdir(_os.path.join(_w, "lesen")): _w = _os.path.dirname(_w) WURZEL = _w -for _u in ("lesen", "entscheiden", "hand", "lobby", "korpus", "betrieb", "mock"): +for _u in ("lesen", "entscheiden", "hand", "client", "lobby", "korpus", "betrieb", "mock"): _q = _os.path.join(_w, _u) if _os.path.isdir(_q) and _q not in _sys.path: _sys.path.insert(0, _q)