Skip to content

Comments

Permit import on Windows without Spawn error.#798

Open
Xorba001 wants to merge 1 commit intopexpect:masterfrom
Xorba001:master
Open

Permit import on Windows without Spawn error.#798
Xorba001 wants to merge 1 commit intopexpect:masterfrom
Xorba001:master

Conversation

@Xorba001
Copy link

@Xorba001 Xorba001 commented Jul 8, 2024

Permit import on Windows without raising Spawn error :

from pexpect import ExceptionPexpect, TIMEOUT, EOF

if sys.platform != 'win32':
from pexpect import spawn
else:
class spawn:
def init(self, *args, **kwargs):
raise NotImplementedError("The 'spawn' function is not implemented on Windows.")

Permit import on Windows without raising Spawn error :

from pexpect import ExceptionPexpect, TIMEOUT, EOF

if sys.platform != 'win32':
from pexpect import spawn
else:
class spawn:
def init(self, *args, **kwargs):
raise NotImplementedError("The 'spawn' function is not implemented on Windows.")
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