Asciinema: Fenster

Erstellt am 17. Feb. 2020  ·  3Kommentare  ·  Quelle: asciinema/asciinema

Bevor Sie dieses Thema schließen, verstehe ich, warum Sie Windows-Terminals nicht unterstützen wollten. Allerdings wird das neue OFFICAL Terminal von Windows eine ordentliche PTY-Unterstützung haben. Die Implementierung in Windows sollte also möglich sein.

Hilfreichster Kommentar

Ich habe in Windows cmd über pip installiert, aber die folgenden Fehler erhalten. Ich denke, das Hauptproblem ist No module named 'fcntl' . Könnten wir es durch eine Multiplattform-Betriebssystem-Unterstützungsbibliothek ersetzen.

D:\Downloads>pip install asciinema
Collecting asciinema
  Downloading https://files.pythonhosted.org/packages/a7/71/771c859795e02c71c187546f34f7535487b97425bc1dad1e5f6ad2651357/asciinema-2.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\setup.py", line 1, in <module>
        import asciinema
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\asciinema\__init__.py", line 15, in <module>
        import asciinema.pty as pty
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\asciinema\pty.py", line 3, in <module>          import fcntl
    ModuleNotFoundError: No module named 'fcntl'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\

D:\Downloads>

Hinweis:

Alle 3 Kommentare

Ich habe in Windows cmd über pip installiert, aber die folgenden Fehler erhalten. Ich denke, das Hauptproblem ist No module named 'fcntl' . Könnten wir es durch eine Multiplattform-Betriebssystem-Unterstützungsbibliothek ersetzen.

D:\Downloads>pip install asciinema
Collecting asciinema
  Downloading https://files.pythonhosted.org/packages/a7/71/771c859795e02c71c187546f34f7535487b97425bc1dad1e5f6ad2651357/asciinema-2.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\setup.py", line 1, in <module>
        import asciinema
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\asciinema\__init__.py", line 15, in <module>
        import asciinema.pty as pty
      File "C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\asciinema\pty.py", line 3, in <module>          import fcntl
    ModuleNotFoundError: No module named 'fcntl'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\LIUD~1.H\AppData\Local\Temp\pip-install-yb29pspy\asciinema\

D:\Downloads>

Hinweis:

Ich denke, fcntl ist derzeit eine (die einzige?) Hürde, um Asciinema auf Ihrem erwähnten Betriebssystem zum Laufen zu bringen.

Bei der Suche nach fcntl habe ich zwei Stellen im Quellcode gefunden, an denen es verwendet wird:

https://github.com/asciinema/asciinema/blob/c94e898ec14c35db294974d4c3370fb154eba298/asciinema/pty.py#L36 -L43
und
https://github.com/asciinema/asciinema/blob/c94e898ec14c35db294974d4c3370fb154eba298/asciinema/pty.py#L150 -L153

In Zeile 36 wird es nur verwendet, um die Terminalfenstergröße zu erhalten, wenn dies nicht möglich ist, verwendet es die Dimension 24x80. Diese Puffergröße wird in Zeile 43 eingestellt. Ich denke, diese Operationen sollten vom alternativen PTY unterstützt werden und könnten leicht ersetzt werden.

Der schwerwiegendere Teil liegt in Zeile 150. Dort wird die Verrohrung auf den NonBlock-Modus gesetzt. Aber laut diesem Beitrag zu Stackoverflow gibt es einen Workaround: https://stackoverflow.com/q/34504970.

Vielleicht ist jemand bereit, es zu versuchen?

Ich würde mich über Windows-Unterstützung freuen!

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

KurtPfeifle picture KurtPfeifle  ·  3Kommentare

lukehinds picture lukehinds  ·  5Kommentare

dlintw picture dlintw  ·  11Kommentare

pfalcon picture pfalcon  ·  4Kommentare

ethanboxx picture ethanboxx  ·  6Kommentare