Raymundo Baquirin | 1 Dec 03:23
Picon

Raymundo Baquirin has invited you to join Friendster

a:link, a:visited, a:active { text-decoration: none; } a:hover { background: none; text-decoration: underline }
You're Invited
You're invited to join Raymundo Baquirin's network of friends.


By joining Friendster, you can reconnect with old friends, meet new friends, start a blog, build a custom profile, keep track of birthdays, and so much more!

You can even stay in touch if you move away, switch email addresses, or lose your mobile phone.


Join Raymundo's Network
Friendster members you may know...
Raymundo
Copyright 2002-2008 Friendster, Inc. All rights reserved. U.S. Patent No. 7,069,308, 7,117,254 & 7,188,153
800 W. El Camino Real, Suite 170, Mountain View, CA 94040, USA
Privacy Policy | Unsubscribe | Terms of Service
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
indian scorpio | 1 Dec 10:11
Picon

SciPy with Jython

Hi

Has sciPy been ported to jython or is there a way to use Scipy in Java.
If yes can anyone provide with a link of an example or anything for
that... i.e demonstrating how to use it. Couldn't really find any...

TIA

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
ShamanMahmoudi | 1 Dec 13:59
Picon
Favicon

using telnetlib and its expect method in jython


Hi,

I am using the latest stable version of jython, version 2.2.1 and I am
trying to write a simple telnet program. However, I am having an issue with
the expect method in it.

Here is my code:

import telnetlib

HOST = 'localhost'
user = 'someone'
password = 'someones password'

tn = telnetlib.Telnet(HOST, 22)

aa, bb, cc = tn.expect(['>>>'], 1)

print aa
print bb
print cc

And this is the error message:

Traceback (innermost last):
  File "/home/qm/workspace/project000/telnettest.py", line 11, in ?
  File "/home/qm/jython/Lib/telnetlib.py", line 623, in expect
  File "/home/qm/jython/Lib/select.py", line 204, in
cpython_compatible_select
  File "/home/qm/jython/Lib/select.py", line 54, in _getselectable
TypeError: ("Object 'java.nio.channels.SocketChannel[connected
local=/127.0.0.1:45293 remote=/127.0.0.1:22]' is not watchable", 88)

What am I supposed to do? Keep in mind that it works fine in Cpython and
also if I replace expect method with read_until method. But, expect is
important for me because there are multiple matches that I want to do, and I
do not know the order in advance.

Thanks in advance!

/edit With further investigation, I have found out that if I leave out the
timeout argument, and run it will work. But as soon as I set the timeout, I
get this error. Any hints on what to do? I mean this method must have been
tested thoroughly before right?
--

-- 
View this message in context: http://www.nabble.com/using-telnetlib-and-its-expect-method-in-jython-tp20769323p20769323.html
Sent from the jython-users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Jim Baker | 1 Dec 18:01
Favicon
Gravatar

Re: SciPy with Jython

SciPy is not ported. We plan to work on NumPy first, once we release 2.5 very soon (in early 2009). Any such NumPy work will take advantage of optimizations we are planning for the advanced compiler and will out of the box support backing large arrays with NetCDF (and unifed with HDF and DAP), since we plan to use the Unidata project as our base (http://www.unidata.ucar.edu/). That could be quite interesting, I think.

On Mon, Dec 1, 2008 at 2:11 AM, indian scorpio <cool.scorpio84 <at> gmail.com> wrote:
Hi

Has sciPy been ported to jython or is there a way to use Scipy in Java.
If yes can anyone provide with a link of an example or anything for
that... i.e demonstrating how to use it. Couldn't really find any...


TIA

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users



--
Jim Baker
jbaker <at> zyasoft.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
jlist | 1 Dec 18:59
Picon

jythono code completion?

Eclipse code-completion works wonderfully for Java. I wonder
if it supports code-completion of Java classes in Jython?
Or, is there some other editors that support this? I have been
using a Python editor for my Jython work and it knows nothing
about the Java classes...

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Charlie Groves | 2 Dec 06:05
Picon
Gravatar

Re: jythono code completion?

On Mon, Dec 1, 2008 at 9:59 AM, jlist <jlist9 <at> gmail.com> wrote:
> Eclipse code-completion works wonderfully for Java. I wonder
> if it supports code-completion of Java classes in Jython?
> Or, is there some other editors that support this? I have been
> using a Python editor for my Jython work and it knows nothing
> about the Java classes...

I believe Pydev - http://pydev.sourceforge.net/ - adds code completion
to Eclipse, though I haven't used it personally.

Charlie

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
jlist | 2 Dec 06:20
Picon

Re: jythono code completion?

Yes, you are right. I just tried it today. It does support
code completion, with limitations, though. When I tried:

from java.lang import System
System.out.println("Hello World")

It was able to prompt after "System." but not after "System.out.".
Not sure if it's a bug or something.

>> Eclipse code-completion works wonderfully for Java. I wonder
>> if it supports code-completion of Java classes in Jython?
>> Or, is there some other editors that support this? I have been
>> using a Python editor for my Jython work and it knows nothing
>> about the Java classes...

> I believe Pydev - http://pydev.sourceforge.net/ - adds code completion
> to Eclipse, though I haven't used it personally.

> Charlie

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Scott, Gregory | 2 Dec 16:28
Picon

Global global variables

Hello,
 
I am using JS223 to execute my python script, lets call it mypython.py
 
Before the engine.exec() Java instruction to execute my script, I want to supply it with a variable, called 'sim'
 
So I call
 
engine.put("sim", new SomeJavaObject())
 
Within the file mypython.py (which is executed) this script has no problem accessing the variable.
 
HOWEVER if I within my python script import another script, this second script has no reference to the 'sim' variable. I.e.
 
mypython.py
 
print 'hello I am in mypython.py'
# this line below works fine
x = sim
import someother.py
 
 
 
someother.py
print 'hello I am in someother.py'
# This line below gives a No Name or whatever error
y = sim
 
How can I fix this? I would really appreciate your suggestions, thank you.
 
Greg
 
 
 
 
 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Jeff Emanuel | 2 Dec 19:51
Favicon

Re: Global global variables


Python modules do not have access to the namespace
of the where they are imported.  Create a namespace
in your interpreter, say __main__, and add sim to it.
Then mypython and someother can import sim from __main__.

I don't know how you would do this with JSR223, but
here's how it would work for PythonInterpreter.

          _interp = new PythonInterpreter();
          PyModule mod = imp.addModule("__main__");
          _interp.setLocals(mod.__dict__);
          _interp.set("sim",new SomeJavaObject());

In your .py files:

try:
  from __main__ import sim
  print sim
except ImportError,oops:
  print oops

Scott, Gregory wrote:
> Hello,
>  
> I am using JS223 to execute my python script, lets call it mypython.py
>  
> Before the engine.exec() Java instruction to execute my script, I want to supply it with a variable,
called 'sim'
>  
> So I call
>  
> engine.put("sim", new SomeJavaObject())
>  
> Within the file mypython.py (which is executed) this script has no problem accessing the variable.
>  
> HOWEVER if I within my python script import another script, this second script has no reference to the
'sim' variable. I.e.
>  
> mypython.py
>  
> print 'hello I am in mypython.py'
> # this line below works fine
> x = sim
> import someother.py
>  
>  
>  
> someother.py
> print 'hello I am in someother.py'
> # This line below gives a No Name or whatever error
> y = sim
>  
> How can I fix this? I would really appreciate your suggestions, thank you.
>  
> Greg
>  
>  
>  
>  
>  
>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jython-users mailing list
> Jython-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>   

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Greg Scott | 2 Dec 22:06
Picon

Re: Global global variables

Thank you,

Does anyone have an idea of the equivalent in JS223, or any other
suggestions?

-----Original Message-----
From: Jeff Emanuel [mailto:jemanuel <at> frii.com] 
Sent: 02 December 2008 18:52
To: Scott, Gregory
Cc: Jython-users <at> lists.sourceforge.net
Subject: Re: [Jython-users] Global global variables

Python modules do not have access to the namespace
of the where they are imported.  Create a namespace
in your interpreter, say __main__, and add sim to it.
Then mypython and someother can import sim from __main__.

I don't know how you would do this with JSR223, but
here's how it would work for PythonInterpreter.

          _interp = new PythonInterpreter();
          PyModule mod = imp.addModule("__main__");
          _interp.setLocals(mod.__dict__);
          _interp.set("sim",new SomeJavaObject());

In your .py files:

try:
  from __main__ import sim
  print sim
except ImportError,oops:
  print oops

Scott, Gregory wrote:
> Hello,
>  
> I am using JS223 to execute my python script, lets call it mypython.py
>  
> Before the engine.exec() Java instruction to execute my script, I want to
supply it with a variable, called 'sim'
>  
> So I call
>  
> engine.put("sim", new SomeJavaObject())
>  
> Within the file mypython.py (which is executed) this script has no problem
accessing the variable.
>  
> HOWEVER if I within my python script import another script, this second
script has no reference to the 'sim' variable. I.e.
>  
> mypython.py
>  
> print 'hello I am in mypython.py'
> # this line below works fine
> x = sim
> import someother.py
>  
>  
>  
> someother.py
> print 'hello I am in someother.py'
> # This line below gives a No Name or whatever error
> y = sim
>  
> How can I fix this? I would really appreciate your suggestions, thank you.
>  
> Greg
>  
>  
>  
>  
>  
>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jython-users mailing list
> Jython-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>   

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane