Skip to content

Add args argument to REPLWrapper & spawn() to mimic pty_spawn#281

Closed
tikuma-lsuhsc wants to merge 2 commits intoCalysto:mainfrom
tikuma-lsuhsc:add-REPLWrapper-args-argument
Closed

Add args argument to REPLWrapper & spawn() to mimic pty_spawn#281
tikuma-lsuhsc wants to merge 2 commits intoCalysto:mainfrom
tikuma-lsuhsc:add-REPLWrapper-args-argument

Conversation

@tikuma-lsuhsc
Copy link
Copy Markdown

@tikuma-lsuhsc tikuma-lsuhsc commented Aug 21, 2024

This PR originates from the issue related to my recent PR to octave_kernel [Re: space in the octave executable path in Windows].

This PR contains two commits:

e800dca: This commit adds args list argument to the REPLWrapper constructor so it can be passed down to spawn. A test method has also been added to test_replwrap.py.

303f2fd: pty_spawn and non-pty_spawn codepaths currently handles command and args differently. This commit makes the non-pty path to be comparable to the pty_spawn implementation. That is, command is only split only if args is not provided.

These two mechanisms are essential to allow an octave executable path with spaces to run in Windows. If this PR is accepted, I will create another PR in octave_kernel to finish resolving the issue.

Thanks

blink1073 added a commit to blink1073/metakernel that referenced this pull request Mar 14, 2026
…h spaces (closes Calysto#281)

Adds an `args` list parameter to `REPLWrapper.__init__` and passes it
through to `pexpect.spawnu`. On the non-pty (Windows) codepath, the
command is no longer shlex-split when `args` is explicitly provided,
matching the pty_spawn behaviour and allowing executable paths
containing spaces to work correctly.
@blink1073 blink1073 closed this in f9f5e94 Mar 15, 2026
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.

1 participant