diff --git a/pyp.py b/pyp.py index b1e1614..56d5051 100644 --- a/pyp.py +++ b/pyp.py @@ -253,7 +253,7 @@ def __init__(self) -> None: # Modules from which automatic imports work without qualification, ordered by AST encounter self.wildcard_imports: List[str] = [] - self.shebang: str = "#!/usr/bin/env python3" + self.shebang: str = f"#!{sys.executable}" if config_contents.startswith("#!"): self.shebang = "\n".join( itertools.takewhile(lambda l: l.startswith("#"), config_contents.splitlines())