Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1679 defect closed duplicate (duplicate)

conch script does not work on Windows

Reported by: synapsis Owned by: synapsis
Priority: normal Milestone:
Component: conch Keywords:
Cc: synapsis Branch:
Author:

Description

The conch (and cftp) script does not work on Windows. There is a specific reason for this? Or simply it can be done?

Attachments (1)

conch.py (24.3 KB) - added by synapsis 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Jonathan Lange

Owner: changed from z3p to synapsis

Hi synapsis,

Is this the same as #50? If not, can you please explain exactly how the conch and cftp scripts misbehave on Windows?

Thanks, jml

comment:2 Changed 11 years ago by Jean-Paul Calderone

Cc: synapsis added

Changed 11 years ago by synapsis

Attachment: conch.py added

comment:3 in reply to:  1 Changed 11 years ago by synapsis

Replying to jml:

Hi synapsis,

Is this the same as #50?

It seems so. However I got this traceback:

Traceback (most recent call last):

File "C:\Python2.4\Scripts\conch.py", line 20, in ?

from twisted.conch.scripts.conch import run

File "C:\Python2.4\lib\site-packages\twisted\conch\scripts\conch.py", line 18,

in ?

import os, sys, getpass, struct, tty, fcntl, base64, signal, stat, errno

File "C:\Python2.4\lib\tty.py", line 5, in ?

from termios import *

ImportError: No module named termios

The same error with cftp.

If not, can you please explain exactly how the conch and cftp scripts misbehave on Windows?

The problem is the same. I think Conch needs some layer of abstraction over the terminal.

I have tried to remove all POSIX specific stuff from twisted.conch.scripts.conch, but now I obtain:

F:\home\manlio\Documenti\Projects\local\languages\Python\Test\twisted>conch --no tty --noshell python.it Traceback (most recent call last):

File "F:\home\manlio\Documenti\Projects\local\languages\Python\Test\twisted\co

nch.py", line 530, in ?

run()

File "F:\home\manlio\Documenti\Projects\local\languages\Python\Test\twisted\co

nch.py", line 121, in run

doConnect()

File "F:\home\manlio\Documenti\Projects\local\languages\Python\Test\twisted\co

nch.py", line 176, in doConnect

connect.connect(host, port, options, vhk, uao).addErrback(_ebExit)

File "C:\Python2.4\lib\site-packages\twisted\conch\client\connect.py", line 13

, in connect

userAuthObject)

File "C:\Python2.4\lib\site-packages\twisted\conch\client\connect.py", line 20

, in _ebConnect

d = f(host, port, options, vhk, uao)

File "C:\Python2.4\lib\site-packages\twisted\conch\client\unix.py", line 395,

in connect

reactor.connectUNIX(filename, factory, timeout=2, checkPID=1)

File "C:\Python2.4\lib\site-packages\twisted\internet\posixbase.py", line 341,

in connectUNIX

assert unixEnabled, "UNIX support is not present"

AssertionError: UNIX support is not present

I have hacked the source, inserting pieces of code from tkconch and I manage to obtain a working conch; it connects to a remote server, display its output but unfortunately I can't write anything (source code attached).

Thanks, jml

Thanks to you Manlio Perillo

comment:4 Changed 11 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

Seems like a duplicate of #50 to me.

synapsis, please attach your changes as a unified diff to #50 if you think there's something useful there.

comment:5 in reply to:  4 Changed 11 years ago by synapsis

Replying to exarkun:

Seems like a duplicate of #50 to me.

synapsis, please attach your changes as a unified diff to #50 if you think there's something useful there.

Ok. I will write a patch (or a specialized version for Windows) once the work on console support for Windows (#2157) is done.

Note: See TracTickets for help on using tickets.