ironpython3 icon indicating copy to clipboard operation
ironpython3 copied to clipboard

import pty module causes ImportException: No module named 'termios'

Open ScottKane opened this issue 3 years ago • 4 comments

Prerequisites

  • [ Y ] Are you running the latest version?
  • [ Y ] Are you reporting to the correct repository?
  • [ Y ] Did you perform a cursory search?

Description

var engine = Python.CreateEngine();
engine.SetSearchPaths(new []{ "/app/.lib" }); 
var scope = engine.CreateScope();
scope.ImportModule("pty");
engine.Execute(@"# Some python", scope);

Expected behavior: Imports work and python executes

Actual behavior: Unhandled exception. IronPython.Runtime.Exceptions.ImportException: No module named 'termios'

Versions

Nuget 3.4.0-alpha1

ScottKane avatar Jan 10 '22 09:01 ScottKane

Thanks for the report. It looks like termios module hasn't been implemented.

slozier avatar Jan 17 '22 14:01 slozier

@slozier then why is it documented with the std library as though it is? https://ironpython-test.readthedocs.io/en/latest/library/termios.html

jstacoder avatar Jan 15 '23 21:01 jstacoder

@jstacoder no idea. I assume the docs were just forked from the Python docs (with minor changes).

slozier avatar Jan 15 '23 23:01 slozier

It looks to me that those documents were a test run / starting point / work in progress that never got fully adapted to IronPython.

BTW, termios will be needed for IPython support on Posix systems, so it is on my radar.

BCSharp avatar Jan 18 '23 02:01 BCSharp