Skip to content

Commit

Permalink
[#367] Fixed encoding errors in DisplayCAL.worker.exec_cmd() for Wi…
Browse files Browse the repository at this point in the history
…ndows by setting the `PYTHONLEGACYWINDOWSSTDIO` environment variable. This is a temporary fix and the neccessary changes to allow `utf-8` encoding will be introduced in future.

[#367] Fixed `DisplayCAL.worker._safe_send()` for Windows.
[#367] Updated `README.md` for Windows install instructions.
  • Loading branch information
eoyilmaz committed Jun 5, 2024
1 parent 0cfd6c6 commit 392c66a
Show file tree
Hide file tree
Showing 15 changed files with 207 additions and 168 deletions.
1 change: 1 addition & 0 deletions DisplayCAL/display_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
elif sys.platform == "darwin":
from DisplayCAL import util_mac
from DisplayCAL import wexpect
# import wexpect
from DisplayCAL.argyll_cgats import (
cal_to_fake_profile,
can_update_cal,
Expand Down
4 changes: 2 additions & 2 deletions DisplayCAL/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _main(module, name, app_lock_file_name, probe_ports=True):
lockfile.unlock()
except EnvironmentError as exception:
# This shouldn't happen
print("Warning - could not read lockfile %s:" % lockfilename, exception)
print(f"Warning - could not read lockfile {lockfilename}:", exception)
if module not in multi_instance:
# Check lockfile(s) and probe port(s)
for lockfilename in [app_lock_file_name]:
Expand All @@ -228,7 +228,7 @@ def _main(module, name, app_lock_file_name, probe_ports=True):
pid, port = pids_ports[0]
appsocket = AppSocket()
if appsocket and port:
print("Connecting to %s..." % port)
print(f"Connecting to {port}...")
if appsocket.connect(host, port):
print("Connected to", port)
# Other instance already running?
Expand Down
Loading

0 comments on commit 392c66a

Please sign in to comment.