dockerpty icon indicating copy to clipboard operation
dockerpty copied to clipboard

dockerpty\io.py fcntl <- linux specific. Not cross-platform.

Open ZeerDonker opened this issue 9 years ago • 8 comments

""" lib\site-packages\dockerpty\io.py", line 18, in import fcntl ImportError: No module named fcntl """

Some googling turned up that fcntl is a linux specific module to lock files.

http://sourceforge.net/p/roundup/code/ci/default/tree/roundup/backends/portalocker.py

Apparently Django for instance also wraps fcntl and the win32api equivalent. "It turns out that Django provides some abstractions around fcntl and the win32api equivalent. This is lock() and unlock() in django.core.files.locks."

ZeerDonker avatar Aug 18 '14 12:08 ZeerDonker

Thanks. I'm actually not using it for locking, but I'm using it for non-blocking IO. I don't have Windows to test on, but if anybody knows what needs doing and can send a PR that keeps the POSIX compatibility I'll take it :)

d11wtq avatar Aug 27 '14 01:08 d11wtq

That said, I think there will be bigger issues than just IO flags. A Windows terminal most likely won't work well with docker at all. This project literally streams what's happening in docker (Linux) to your own terminal (Windows). Maybe Cygwin will work though.

d11wtq avatar Aug 27 '14 01:08 d11wtq

I use fig and depend on dockerpty, therefore it is not working on windows :(

Some information: http://stackoverflow.com/questions/6799693/changing-mp4ize-py-to-work-on-windows http://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python

tamascsaba avatar Dec 04 '14 09:12 tamascsaba

+1 on this issue. It should definitively work in a windows terminal without using cygwin.

secat avatar Apr 12 '15 18:04 secat

The thing is, even if docker could stream what's happening in docker into your Windows Terminal, it would just be gibberish anyway, since the Docker container is itself Linux and uses a different terminal encoding from Windows.

d11wtq avatar Apr 13 '15 00:04 d11wtq

Hi, I use docker for my dev environment and because it makes my life a lot easier. But I also have a Windows env and it will be awesome if dockerpty could support it too :) I'll try to see if I can do something but... if someone else has more knowledge than me in python it could be easier :)

Nicofuma avatar Apr 30 '15 09:04 Nicofuma

docker-compose gives the error on Windows

Name: docker-compose
Version: 1.2.0
Location: c:\dev\tools\python27\lib\site-packages
Requires: docopt, PyYAML, requests, texttable, websocket-client, docker-py, dockerpty, six

and error

ImportError: No module named fcntl

firstthumb avatar Jun 02 '15 10:06 firstthumb