Skip to content

Conversation

@zooba
Copy link
Member

@zooba zooba commented Jan 19, 2026

Fixes #216

Copy link

Copilot AI left a comment

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The 'Python Application (Windowed)' launched via the Python Installation Manager displays a console window.

1 participant