Skip to content

Commit

Permalink
fix editor on pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Feb 20, 2024
1 parent 163da8a commit d277ab0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cat_win/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,8 @@ def main():
if holder.args_id[ARGS_STDIN]:
tty = os.open('CONIN$' if on_windows_os else '/dev/tty', os.O_RDONLY)
os.dup2(tty, sys.stdin.fileno())
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): # pyinstaller
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS') and on_windows_os:
# for pyinstaller:
import ctypes
# stdin, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
# None security, OPEN_EXISTING, 0 flags, None template
Expand Down

0 comments on commit d277ab0

Please sign in to comment.