Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIndows #67

Closed
SR-Lut3t1um opened this issue Feb 17, 2020 · 5 comments
Closed

WIndows #67

SR-Lut3t1um opened this issue Feb 17, 2020 · 5 comments

Comments

@SR-Lut3t1um
Copy link

SR-Lut3t1um commented Feb 17, 2020

Now before you just close this issue, I do undertand why you did not want to support windows terminals. However the new OFFICAL Terminal from windows is goint to have a proper PTY support. So implementing this in windows should be possible.

@liudonghua123
Copy link

I installed in Windows cmd via pip, but got the following errors. I think the key problem is No module named 'fcntl', Could we replace it with a multi platform OS support library.

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>

reference:

@Delapro
Copy link

Delapro commented Dec 14, 2020

I think currently fcntl is one (the only?) roadblock for getting asciinema to run on your mentioned OS.

Searching for fcntl I found two places in the source code where it is used:

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

At line 36 it is just used to get the terminal window size, if it's not possible it uses the 24x80 dimension. This buffer size is set in line 43. I think this operations should be supported by the alternate PTY and could easily replaced.

The more serious part lies in line 150. There the piping gets set to NonBlock mode. But according to this post on stackoverflow there is a workaround: https://stackoverflow.com/q/34504970.

Maybe somebody is willing to try?

@Melandel
Copy link

I would love windows support!

@rashil2000
Copy link

rashil2000 commented Jul 27, 2021

FWIW, as mentioned in #48
there is a native C# port for Windows that records in the asciicast format and supports uploading directly to asciinema.org

@sickill would you mind adding this info to the readme?

(or you can also use terminalizer which is cross-platform and directly outputs GIFs)

@rollingmoai
Copy link

there is a native C# port for Windows that records in the asciicast format and supports uploading directly to asciinema.org

Now on rust: https://github.com/Watfaq/PowerSession-rs

@ku1ik ku1ik transferred this issue from asciinema/asciinema Apr 25, 2023
@asciinema asciinema locked and limited conversation to collaborators Apr 25, 2023
@ku1ik ku1ik converted this issue into discussion #68 Apr 25, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants