Skip to content

Uses windowed setting in shebang processing to avoid using the console. - #254

Merged
zooba merged 2 commits into
python:mainfrom
zooba:gh-216
Jan 21, 2026
Merged

Uses windowed setting in shebang processing to avoid using the console.#254
zooba merged 2 commits into
python:mainfrom
zooba:gh-216

Conversation

@zooba

@zooba zooba commented Jan 19, 2026

Copy link
Copy Markdown
Member

Fixes #216

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for a windowed parameter to shebang processing, allowing scripts to be launched with GUI-mode executables instead of console executables on Windows. This addresses issue #216 by enabling proper windowed behavior when launching Python scripts.

Changes:

  • Added windowed keyword-only parameter to shebang processing functions (_find_shebang_command, _parse_shebang, _read_script, find_install_from_script)
  • Implemented logic to substitute windowed aliases when windowed=True is requested
  • Updated integration point in commands.py to pass the windowed parameter through to script processing
  • Added comprehensive tests for windowed shebang behavior with 25 new test cases

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/manage/scriptutils.py Added windowed parameter to all shebang processing functions and implemented logic to substitute windowed executables when requested
src/manage/commands.py Updated get_install_to_run to pass windowed parameter to find_install_from_script
tests/test_scriptutils.py Added test data for windowed aliases, new test_read_shebang_windowed test with 25 cases, and updated existing tests to explicitly pass windowed=False

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/manage/scriptutils.py Outdated
Comment thread src/manage/scriptutils.py
@zooba
zooba merged commit 802b8e0 into python:main Jan 21, 2026
4 checks passed
@zooba
zooba deleted the gh-216 branch January 21, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants