From: Travis B. <tb...@my...> - 2005-01-21 06:51:32
|
Sorry if this is a newb question, I've looked at all the documentation I can find, but so far no luck. If there is a better resource than this list, I'd be happy to know what it is. Does pyssh work in jython? I've struggled to get it going, with no luck. Is pyssh an implementation of the ssh protocol in python, or is it a wrapper for pre-existing, native ssh implementations? With c-python, everything seems to work fine. These are my efforts with jython so far: >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named pyssh so I modified the registry: python.path=/usr/lib/python2.3/site-packages >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, in ? ImportError: no module named getpass Ok that's a little better, but where is getpass? Doing a quick file search, I found one in /usr/lib/python2.3. Next registry change: python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 >>> import pyssh Traceback (innermost last): File "<console>", line 1, in ? File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, in ? ImportError: no module named signal This was as far as I could get. A global file search showed nothing that looked useful. Thanks in advance, -Travis Bear |
From: Mark W. A. <sl...@do...> - 2005-01-21 13:28:10
|
On Thu, Jan 20, 2005 at 10:51:23PM -0800, Travis Bear wrote: > Sorry if this is a newb question, I've looked at all the documentation > I can find, but so far no luck. If there is a better resource than > this list, I'd be happy to know what it is. Not really. I recently took over as maintainer, and even more recently found the documentation... > Does pyssh work in jython? I don't know. I haven't played much with Jython. But I'm game, if you are ;) > I've struggled to get it going, with no luck. Is pyssh an > implementation of the ssh protocol in python, or is it a wrapper for > pre-existing, native ssh implementations? It's just a wrapper around the ssh binaries. I've stumbled on Twisted's conch (www.twistedmatrix.com) and that appears to be a Python implementation of the SSH prototcol, but I haven't dug very deep. > With c-python, everything seems to work fine. These are my efforts > with jython so far: > > > > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: no module named pyssh > > so I modified the registry: python.path=/usr/lib/python2.3/site-packages Registry? Your on Windows? If so, you may be in trouble... From what I've read, pyssh was written on *NIX for *NIX but again, I'm willing to work on it. Since it's a wrapper, it would require a CLI Windows ssh binary. What do you use for ssh now? > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, > in ? > ImportError: no module named getpass > > Ok that's a little better, but where is getpass? Doing a quick file > search, I found one in /usr/lib/python2.3. Next registry change: > > python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 > > >>>import pyssh > Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, > in ? > ImportError: no module named signal getpass and signal are standard python modules, however I'm not sure if signal is cross-platform. I'm Windows ignorant (by choice), but I think signal is a POSIX feature. There may be a signal for Windows; I don't know. I'll look when I get to a Windows box. > > This was as far as I could get. A global file search showed nothing > that looked useful. > > Thanks in advance, What? For _more_ not useful information ;) I'm interested in supporting Jython, because I may have a future use for it anyway. I'd like to support Windows, so if you are using Windows, then I'd appreciate any suggestions/advice/testing you can provide. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-21 20:09:32
|
Mark, This is a linux machine I'm working on (Fedora Core 3). The registry I was referring to was the Jython registry. If I am thinking about signal in the right way (SIGHUP, SIGKILL, etc) then there is no equivalent in the Windows world as far as I know. You say getpass and signal are standard python libraries. I found getpass in /usr/lib/python2.3, but where does signal usually live? As I said, a file search for "*signal*" didn't turn up anything that looked useful. Thanks! -Travis On Jan 21, 2005, at 5:28 AM, Mark W. Alexander wrote: > On Thu, Jan 20, 2005 at 10:51:23PM -0800, Travis Bear wrote: >> Sorry if this is a newb question, I've looked at all the documentation >> I can find, but so far no luck. If there is a better resource than >> this list, I'd be happy to know what it is. > > Not really. I recently took over as maintainer, and even more recently > found the documentation... > >> Does pyssh work in jython? > > I don't know. I haven't played much with Jython. But I'm game, if you > are ;) > >> I've struggled to get it going, with no luck. Is pyssh an >> implementation of the ssh protocol in python, or is it a wrapper for >> pre-existing, native ssh implementations? > > It's just a wrapper around the ssh binaries. I've stumbled on Twisted's > conch (www.twistedmatrix.com) and that appears to be a Python > implementation of the SSH prototcol, but I haven't dug very deep. > >> With c-python, everything seems to work fine. These are my efforts >> with jython so far: >> >> >> >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> ImportError: no module named pyssh >> >> so I modified the registry: >> python.path=/usr/lib/python2.3/site-packages > > Registry? Your on Windows? If so, you may be in trouble... From what > I've read, pyssh was written on *NIX for *NIX but again, I'm willing to > work on it. Since it's a wrapper, it would require a CLI Windows ssh > binary. What do you use for ssh now? > >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 20, >> in ? >> ImportError: no module named getpass >> >> Ok that's a little better, but where is getpass? Doing a quick file >> search, I found one in /usr/lib/python2.3. Next registry change: >> >> python.path=/usr/lib/python2.3/site-packages:/usr/lib/python2.3 >> >>>>> import pyssh >> Traceback (innermost last): >> File "<console>", line 1, in ? >> File "/usr/lib/python2.3/site-packages/pyssh/__init__.py", line 21, >> in ? >> ImportError: no module named signal > > getpass and signal are standard python modules, however I'm not sure if > signal is cross-platform. I'm Windows ignorant (by choice), but I think > signal is a POSIX feature. There may be a signal for Windows; I don't > know. I'll look when I get to a Windows box. > >> >> This was as far as I could get. A global file search showed nothing >> that looked useful. >> >> Thanks in advance, > > What? For _more_ not useful information ;) I'm interested in supporting > Jython, because I may have a future use for it anyway. I'd like to > support Windows, so if you are using Windows, then I'd appreciate any > suggestions/advice/testing you can provide. > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > _________________________________________________ > Scanned on 21 Jan 2005 13:28:29 > |
From: Mark W. A. <sl...@do...> - 2005-01-21 22:20:39
|
On Fri, Jan 21, 2005 at 12:09:21PM -0800, Travis Bear wrote: > Mark, > > This is a linux machine I'm working on (Fedora Core 3). The registry I > was referring to was the Jython registry. If I am thinking about > signal in the right way (SIGHUP, SIGKILL, etc) then there is no > equivalent in the Windows world as far as I know. > > You say getpass and signal are standard python libraries. I found > getpass in /usr/lib/python2.3, but where does signal usually live? As > I said, a file search for "*signal*" didn't turn up anything that > looked useful. Hmm... mwa@cougar:~$ python Python 2.3.4 (#2, Jan 5 2005, 08:24:51) [GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> signal.__file__ Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'module' object has no attribute '__file__' >>> Looks like it's a builtin. Can you just import it? mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-21 23:20:42
|
Can't import signal: [travis@tiny ~]$ cd jython-2.1/ [travis@tiny jython-2.1]$ ./jython Jython 2.1 on java1.5.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import signal Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named signal >>> From the JYthon docs, it wasn't clear but I inferred that not all builtins are supported: http://www.jython.org/docs/differences.html Perhaps signal use can be avoided or redone? -Travis On Jan 21, 2005, at 2:20 PM, Mark W. Alexander wrote: > On Fri, Jan 21, 2005 at 12:09:21PM -0800, Travis Bear wrote: >> Mark, >> >> This is a linux machine I'm working on (Fedora Core 3). The registry >> I >> was referring to was the Jython registry. If I am thinking about >> signal in the right way (SIGHUP, SIGKILL, etc) then there is no >> equivalent in the Windows world as far as I know. >> >> You say getpass and signal are standard python libraries. I found >> getpass in /usr/lib/python2.3, but where does signal usually live? As >> I said, a file search for "*signal*" didn't turn up anything that >> looked useful. > > Hmm... > > mwa@cougar:~$ python > Python 2.3.4 (#2, Jan 5 2005, 08:24:51) > [GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import signal >>>> signal.__file__ > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: 'module' object has no attribute '__file__' >>>> > > Looks like it's a builtin. Can you just import it? > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > _________________________________________________ > Scanned on 21 Jan 2005 22:32:50 > |
From: Mark W. A. <sl...@do...> - 2005-01-22 14:39:18
|
On Fri, Jan 21, 2005 at 03:20:27PM -0800, Travis Bear wrote: > Can't import signal: > > [travis@tiny ~]$ cd jython-2.1/ > [travis@tiny jython-2.1]$ ./jython > Jython 2.1 on java1.5.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> import signal > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: no module named signal > >>> > > From the JYthon docs, it wasn't clear but I inferred that not all > builtins are supported: > http://www.jython.org/docs/differences.html > > Perhaps signal use can be avoided or redone? Not without significant effort. signal is used to reap child processes and prevent zombies which is a natural consequence of pyssh being a wrapper around the ssh binaries. Google seems to indicate that Java, hence Jython, does not support signals (http://aspn.activestate.com/ASPN/Mail/Message/Jython-users/687321), although I can't get the answer to that post to load. A quick Google for "jython twisted" seems to indicate that Twisted has at least some support for Jython. Maybe you should give Twisted's conch module a look. I'd be interested in what you find. mwa -- Mark W. Alexander sl...@do... The contents of this message authored by Mark W. Alexander are released under the Creative Commons Attribution-NonCommercial license. Copyright of quoted materials, if any, are retained by the original author(s). http://creativecommons.org/licenses/by-nc/2.0/ |
From: Travis B. <tb...@my...> - 2005-01-23 08:25:30
|
Twisted's API documentation for ssh/scp, said that the current implementations were still unstable. Drat. I was hoping my project would be compatible with CPyton as well as Jython, but now I'm resigned to a Jython-only implemenation that uses the j2ssh libs. Thanks for following up with all my questions. -Travis On Jan 22, 2005, at 6:39 AM, Mark W. Alexander wrote: > On Fri, Jan 21, 2005 at 03:20:27PM -0800, Travis Bear wrote: >> Can't import signal: >> >> [travis@tiny ~]$ cd jython-2.1/ >> [travis@tiny jython-2.1]$ ./jython >> Jython 2.1 on java1.5.0 (JIT: null) >> Type "copyright", "credits" or "license" for more information. >>>>> import signal >> Traceback (innermost last): >> File "<console>", line 1, in ? >> ImportError: no module named signal >>>>> >> >> From the JYthon docs, it wasn't clear but I inferred that not all >> builtins are supported: >> http://www.jython.org/docs/differences.html >> >> Perhaps signal use can be avoided or redone? > > Not without significant effort. signal is used to reap child processes > and prevent zombies which is a natural consequence of pyssh being a > wrapper around the ssh binaries. > > Google seems to indicate that Java, hence Jython, does not support > signals > (http://aspn.activestate.com/ASPN/Mail/Message/Jython-users/687321), > although I can't get the answer to that post to load. > > A quick Google for "jython twisted" seems to indicate that Twisted has > at least some support for Jython. Maybe you should give Twisted's conch > module a look. I'd be interested in what you find. > > mwa > -- > Mark W. Alexander > sl...@do... > > The contents of this message authored by Mark W. Alexander are > released under > the Creative Commons Attribution-NonCommercial license. Copyright of > quoted > materials, if any, are retained by the original author(s). > > http://creativecommons.org/licenses/by-nc/2.0/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Pyssh-discuss mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pyssh-discuss > > > _________________________________________________ > Scanned on 22 Jan 2005 15:07:59 > |