Giter Site home page Giter Site logo

Comments (8)

rprichard avatar rprichard commented on August 21, 2024

I'm seeing a "The system cannot find the path specified." error using winpty. I'm looking into it.

from winpty.

rprichard avatar rprichard commented on August 21, 2024

Probable workaround: mintty sets TERM to xterm. Instead, unset it or set it to dumb before running IronPython.

Long version:

Setting TERM to dumb will fix the problem.

FWIW, I've been considering having the winpty console program set TERM. winpty operates a hidden Windows console, so I've been thinking winpty should set TERM the same way that Cygwin would set it for a Windows console, which is TERM=cygwin. Doing so fixes a cursor key problem with less.

However, TERM=cygwin doesn't work for IronPython. Only TERM=dumb does.

So, maybe the right behavior is for console to unset TERM? Cygwin programs shouldn't care -- the Cygwin library will notice that it's running under a console. For non-Cygwin programs, TERM=xterm seems strictly more wrong than an unset TERM.

from winpty.

jchain avatar jchain commented on August 21, 2024

I tried export TERM=dumb and export TERM=. Either of them worked. The output of help(0) in the IronPython prompt was still empty.

Still thank you a lot for your effort on this issue.

from winpty.

rprichard avatar rprichard commented on August 21, 2024

Could you tell me the versions of software you're using? In particular, I'd like to know what version of IronPython, winpty, and Cygwin DLL you're using, but other details like OS version, 32/64-bitness, and mintty version might help. Are you're using a precompiled winpty binary?

One idea I had -- maybe instead of clearing the TERM variable before invoking console, clear it inside the winpty console, e.g.:

mintty prompt> console cmd
cmd prompt> set TERM=
cmd prompt> cd /D "C:\Program Files\IronPython 2.7"
cmd prompt> ipy
ipy prompt> help(0)

from winpty.

jchain avatar jchain commented on August 21, 2024

Ironpython: 2.7.4 (32bit)
winpty: 0.1.1 (precompiled)
cygwin: 1.7.30 (32bit)
Windows 8.1 (64bit)
mintty: 1.1.3

Your new idea didn't work either. The TERM in cmd is dumb before setting it to empty. Thank you.

from winpty.

rprichard avatar rprichard commented on August 21, 2024

Do you have a PAGER environment variable set? When I set it to less, I notice that help(0) stops working in IronPython. (Actually, IronPython doesn't seem to work with any PAGER setting. Even PAGER=more.com breaks it, with no winpty involvement. CPython works with PAGER=more.com.)

What does pydoc.getpager() evaluate to, for you? For me, with TERM=dumb, it's plainpager. If I set a PAGER, then I instead get a lambda.

rprichard@vbwin7 /cygdrive/c/Program Files/IronPython 2.7
$ /cygdrive/c/rprichard/winpty-0.1.1-cygwin/console.exe cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Program Files\IronPython 2.7>set TERM=

C:\Program Files\IronPython 2.7>set PAGER=

C:\Program Files\IronPython 2.7>ipy
IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydoc
>>> pydoc.getpager()
<function plainpager at 0x000000000000002B>
>>> ^Z

C:\Program Files\IronPython 2.7>set PAGER=more.com

C:\Program Files\IronPython 2.7>ipy
IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydoc
>>> pydoc.getpager()
<function <lambda$95> at 0x000000000000002B>

from winpty.

jchain avatar jchain commented on August 21, 2024

Awesome. After set TERM= and set PAGER=, help(0) worked! Thank you so much for taking care of this.

from winpty.

rprichard avatar rprichard commented on August 21, 2024

I think this issue is fixed now?

from winpty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.