On Tuesday 27 May 2003 18:11, Phillip Sweeney wrote:
> Hello -
>
> I am trying to write a quick program that will go and
> telnet to a unix box, login and see what group
> membership a user has.
>
> I also have wider ranging needs to be able to telnet
> from java.
>
> So I tried to write a python program to do the
> telnetting using Jython 2.1. I successfully wrote a
> python program to telnet to a machine and determine
> user groups - all is great!!!
>
> Now - I try to glue the whole thing together and
> Jython will not run the script! Included in the lib
> folder of jython is the telnetlib.py, but icannot call
> it from the java program...
>
> Do I need to do anything else berfore running this
> java/jython code? Is there a better way to do this?
>
Perhaps, you can use some java code and script it.
Take a look on jakarta/net component
http://jakarta.apache.org/commons/net/index.html
You can sript in Jython the org.apache.commons.net.telnet.TelnetClient
class, and then you don't need to give string to an embedded interpreter...
HTH
=2D-
=46r=E9d=E9ric Laurent
http://www.opikanoba.org

Frederic -
Thanks for this -
I did use the net components - and it is working very
well...i have a nice sample that works on solatris and
rh linux.
Thanks for this
Phil
--- Frederic Laurent <fl@...> wrote:
> On Tuesday 27 May 2003 18:11, Phillip Sweeney wrote:
> > Hello -
> >
> > I am trying to write a quick program that will go
> and
> > telnet to a unix box, login and see what group
> > membership a user has.
> >
> > I also have wider ranging needs to be able to
> telnet
> > from java.
> >
> > So I tried to write a python program to do the
> > telnetting using Jython 2.1. I successfully wrote
> a
> > python program to telnet to a machine and
> determine
> > user groups - all is great!!!
> >
> > Now - I try to glue the whole thing together and
> > Jython will not run the script! Included in the
> lib
> > folder of jython is the telnetlib.py, but icannot
> call
> > it from the java program...
> >
> > Do I need to do anything else berfore running this
> > java/jython code? Is there a better way to do
> this?
> >
>
>
> Perhaps, you can use some java code and script it.
> Take a look on jakarta/net component
>
> http://jakarta.apache.org/commons/net/index.html
>
> You can sript in Jython the
> org.apache.commons.net.telnet.TelnetClient
> class, and then you don't need to give string to an
> embedded interpreter...
>
> HTH
>
> --
> Frédéric Laurent
> http://www.opikanoba.org
>
=====
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Phillip Sweeney - Senior Engineer/Developer
AT&T Labs - iGEMS Engineering Group
200 Laurel Ave.
Middletown NJ 07748
203-820-4666/cell - phillipsweeney@...
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~