Frank Wierzbicki | 1 Oct 18:36
Picon
Gravatar

Re: [Jython-bugs] Bugs

Hello Prashant,

The bugs mailing list is really for automatic reports from
http://bugs.jython.org, so it is better to submit bugs to the tracker.
 If you do want to use a mailing list, subscribing and then sending
mail to jython-users.  I've cc-ed jython-users.  It looks like you are
using "as" as a variable class, or function name, which is disallowed
in Python 2.6 ("as" will then be a keyword).  So far it is also
disallowed in Jython 2.5 because of some difficulties getting our new
grammar to let it pass.  The best thing to do for now is to change
whatever variable/function/class name from 'as' to something else.

On Tue, Sep 30, 2008 at 5:10 AM, Prashant Golash
<prashant.golash <at> gmail.com> wrote:
> I have some pyhton scripts which I am calling from java.The following error
> was coming.Please have a look at them
> SyntaxError: ("line 1243:16 no viable alternative at input 'as'",
> ('C:\\Projects\\ca\\sox\\soxjython\\jpython\\rpl.py', 1243, 16,)

-------------------------------------------------------------------------
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=/
Fabio Zadrozny | 3 Oct 02:56
Picon

Pydev 1.3.22 Released

Hi All,

Pydev and Pydev Extensions 1.3.22 have been released

Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com

Release Highlights in Pydev Extensions:
-----------------------------------------------------------------

* Code-analysis: Option to analyze only active editor
* Code-analysis: works on case where imported module has same name of builtin.

Release Highlights in Pydev:
----------------------------------------------

* Debugger: Pythonpath is the same in debug and regular modes
(sys.path[0] is the same directory as the file run)
* Debugger: Choices for paths not found are persisted
* Code-completion: If __all__ is defined with runtime elements (and
not only in a single assign statement), it's ignored for
code-completion purposes
* Code-completion: Works on case where imported module has same name of builtin
* Editor: Cursor settings no longer overridden
* Interpreter config: "email" automatically added to the "forced builtins"
* Parser: Correctly recognizing absolute import with 3 or more levels
* Syntax check: Option analyze only active editor
* getpass.getpass: No longer halts when run from pydev (but will show
the password being written)
(Continue reading)

John Speranzini | 3 Oct 15:44
Picon

jython __doc__ not working


 I installed pydev 1.3.20 with jython 2.2.1 on eclipse 3.3 on Windows XP.  I'm trying to get code completion to work but I can't see jython's javadocs, as I explain in this post: http://sourceforge.net/forum/forum.php?thread_id=2312653&forum_id=293649

 Also what version of java does jython support.  I see you need at least 1.4.2, but will it support up to 6?

 Thanks.
-------------------------------------------------------------------------
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
Josh Juneau | 6 Oct 14:53
Picon

Nice Javaposse Interview

In case you haven't heard yet, the Jython developers had a great
interview with the Javaposse while at the JVM Summit.

Go to www.javaposse.com and get it...it is definitely worth a listen.

Josh Juneau
juneau001 <at> gmail.com
http://jj-blogger.blogspot.com
http://www.gathereventplanning.com
Twitter ID:  javajuneau

-------------------------------------------------------------------------
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=/
John Speranzini | 6 Oct 21:14
Picon

Re: jython __doc__ not working

I tried adding the javadocs to the PYTHONPATH, first jython2.2.1\Doc, then more specifically jython2.2.1\Doc\javadoc, still can't see the docs during code completion.

I installed python 2.6 and can see the javadocs properly for code completion from the python perspective.

Also tried something random, adding python's .chm file, didn't work.

Need some help here please.



From: uhimatoti <at> hotmail.com
To: jython-users <at> lists.sourceforge.net
Date: Fri, 3 Oct 2008 09:44:19 -0400
Subject: [Jython-users] jython __doc__ not working

.ExternalClass .EC_hmmessage P {padding:0px;} .ExternalClass body.EC_hmmessage {font-size:10pt;font-family:Tahoma;}
 I installed pydev 1.3.20 with jython 2.2.1 on eclipse 3.3 on Windows XP.  I'm trying to get code completion to work but I can't see jython's javadocs, as I explain in this post: http://sourceforge.net/forum/forum.php?thread_id=2312653&forum_id=293649

 Also what version of java does jython support.  I see you need at least 1.4.2, but will it support up to 6?

 Thanks.
-------------------------------------------------------------------------
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
Michał Bednarczyk | 7 Oct 13:54
Picon

Greeting and question

Hello everyone,

I'm new here and new jython "user" (i'm not programmer).

I've got problems with databases connection (mysql and sqlserver). Mysql first. This is my code:

 
from com.ziclix.python.sql import zxJDBC
d, u, p, v = "jdbc:mysql://localhost/testowa", "root", "pass", "org.gjt.mm.mysql.Driver"

db = zxJDBC.connect(d, u, p, v)
cursor = db.cursor()

try:
	insert = cursor.execute("INSERT INTO network (ipadr, mask) values ('194.29.3.233', '255.255.192.0');")
	print "Data inserted"
except:
	"Error with data inserting..."

cursor.close()
db.close()

And the result is: "Data inserted" but I haven't any new rows in my table...
When I try to select data from this table, the result:

result = cursor.execute("SELECT * FROM network;")
if result == None:
	print "No result"
else:
	for row in result.fetchall():
		print row

... is "No result" but I have two rows in this table.

What is wrong? Script is connected to mysql (it can show dbversion - 5.0.67-community-nt). MySQL JDBC
driver is mysql-connector-java-5.1.6-bin.jar.

Second problem is with connecting to MS SQL server. I've got SQL Server Driver from Microsoft, but when I'm
trying to connect to database:

from com.ziclix.python.sql import zxJDBC
d, u, p, v = "jdbc:sqlserver://10.0.0.180:1433/testowa", "bednarczykm", "pass", "com.microsoft.sqlserver.jdbc.SQLServerDriver"
db = zxJDBC.connect(d, u, p, v)

there is an error:
DatabaseError: driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] not found

I'm using Easy Eclipse on Windows XP, CLASSPATH is correct, jar files are added to project.

What should I check? Are there bugs in my scripts?

Regards,
Bednar

-------------------------------------------------------------------------
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=/
Leo Soto M. | 7 Oct 16:06
Picon
Gravatar

Re: Greeting and question

On Tue, Oct 7, 2008 at 7:54 AM, Michał Bednarczyk
<michal.bednarczyk <at> perfectline.pl> wrote:

[...]

>
> from com.ziclix.python.sql import zxJDBC
> d, u, p, v = "jdbc:mysql://localhost/testowa", "root", "pass", "org.gjt.mm.mysql.Driver"
>
> db = zxJDBC.connect(d, u, p, v)
> cursor = db.cursor()
>
> try:
>        insert = cursor.execute("INSERT INTO network (ipadr, mask) values ('194.29.3.233', '255.255.192.0');")
>        print "Data inserted"
> except:
>        "Error with data inserting..."
>
>
> cursor.close()
> db.close()
>
>
> And the result is: "Data inserted" but I haven't any new rows in my table...

You need to do `db.commit()`.

> When I try to select data from this table, the result:
>
>
> result = cursor.execute("SELECT * FROM network;")
> if result == None:
>        print "No result"

`execute` doesn't return anything. Or to be more precise, according to
the DB-API spec[1] "return values are not defined". If your select
doesn't return anything, fetchall() will return an empty sequence.

I suggest you take a look at the DB-API spec or some related tutorial.
Jython's zxJDBC follows the spec very closely.

> Second problem is with connecting to MS SQL server. I've got SQL Server Driver from Microsoft, but when I'm
trying to connect to database:
>
>
> from com.ziclix.python.sql import zxJDBC
> d, u, p, v = "jdbc:sqlserver://10.0.0.180:1433/testowa", "bednarczykm", "pass", "com.microsoft.sqlserver.jdbc.SQLServerDriver"
> db = zxJDBC.connect(d, u, p, v)
>
>
> there is an error:
> DatabaseError: driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] not found
> I'm using Easy Eclipse on Windows XP, CLASSPATH is correct, jar files are added to project.

What jython version are you using? 2.2.x? Or some 2.5 alpha release?

[1] http://www.python.org/dev/peps/pep-0249/
--

-- 
Leo Soto M.
http://blog.leosoto.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
astigmatik | 7 Oct 22:48
Picon

Jython Script Deployment: Revisited

I have a test.py, and these are the lines:

from java.awt import *
from javax.swing import *
print "This is running"
f = JFrame("Test", defaultCloseOperation=JFrame.EXIT_ON_CLOSE)
f.show()

I pack the test.py into a standalone jython.jar (in the Lib/ folder)
-- let's call it jythonsa.jar.

When I typed in the command line:

java -jar jythonsa.jar test.py

The "This is running" is printed (which is fine), but I get a NameError: JFrame

1. Why is that so? And how do I fix it?
2. If I have a big module (i.e. a directory with lots of .py files and
subdirs in it), how do I run the module?

-------------------------------------------------------------------------
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=/
astigmatik | 7 Oct 22:48
Picon

Re: Jython Script Deployment: Revisited

I forgot to add some info: I'm using WinXP and Jython2.2.1.

On Wed, Oct 8, 2008 at 4:48 AM,  <astigmatik <at> gmail.com> wrote:
> I have a test.py, and these are the lines:
>
> from java.awt import *
> from javax.swing import *
> print "This is running"
> f = JFrame("Test", defaultCloseOperation=JFrame.EXIT_ON_CLOSE)
> f.show()
>
> I pack the test.py into a standalone jython.jar (in the Lib/ folder)
> -- let's call it jythonsa.jar.
>
> When I typed in the command line:
>
> java -jar jythonsa.jar test.py
>
> The "This is running" is printed (which is fine), but I get a NameError: JFrame
>
> 1. Why is that so? And how do I fix it?
> 2. If I have a big module (i.e. a directory with lots of .py files and
> subdirs in it), how do I run the module?
>

-------------------------------------------------------------------------
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=/
Polly Powledge | 7 Oct 23:37
Picon

Re: Jython Script Deployment: Revisited

> from java.awt import *
> from javax.swing import *
> print "This is running"
> f = JFrame("Test", defaultCloseOperation=JFrame.EXIT_ON_CLOSE)
> f.show()
>....
> The "This is running" is printed (which is fine), but I get a NameError: JFrame

I got my code running by importing into my namespace like this:

from javax.swing import JFrame

and then I could instantiate JFrame.

> 2. If I have a big module (i.e. a directory with lots of .py files and
> subdirs in it), how do I run the module?

I put my .py's in a directory in the Lib folder, and then invoked
org.python.util.jython with an argument of whatever .py I wanted to
kick off. BTW,  I used install4j to build the launchers and the
installation package. This worked fine for WInXP Pro and Home target
platforms, using Jython 2.2.1.

HTH,

Polly Powledge

-------------------------------------------------------------------------
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