Skip to content

Commit

Permalink
disable python shell integration for wsl
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Nov 15, 2024
1 parent 3e30f9d commit 9b26fde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python_files/pythonrc.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import platform
import sys

if sys.platform != "win32":
import readline

original_ps1 = ">>> "
use_shell_integration = sys.version_info < (3, 13)
is_wsl = "microsoft-standard-WSL" in platform.release()


class REPLHooks:
Expand Down Expand Up @@ -73,5 +75,5 @@ def __str__(self):
return result


if sys.platform != "win32" and use_shell_integration:
if sys.platform != "win32" and (not is_wsl) and use_shell_integration:
sys.ps1 = PS1()

0 comments on commit 9b26fde

Please sign in to comment.