From: D-Man <ds...@ri...> - 2001-02-02 15:14:39
|
On Fri, Feb 02, 2001 at 09:47:53PM +0900, syKim wrote: | | Thank you for your reply again.. You're welcome. | | I tested that two way.. | | first : same your code. | | second : I attached some code behind that like | | if __name__ == '__main__': | import pawt | pawt.test(HelloApplet(), size=(500, 120)) I'm not familiar with the "pawt" module. | | I compiled that several ways. | (just -w . or --core -d or --core -d --jar HelloApplet.jar) | | however, the applet doesn't work. | (in addition, jython should have org folder with java files --> you can know if you test with appletviewer | then, I copied the folder from jython folder to testing folder.) | | when I execute appletviewer, some error occured like that : | | java.lang.NullPointerException | | at org.python.core.PyJavaClass.lookup (PyJavaClass.java:39) | ... In PyJavaClass.java, on line 39, the Jython runtime is trying to dereference a null pointer. I don't know right now what is causing this. | | hmm.. How can I solve this problem? | | and, Is not exist another way to implement web-browser-based application with python? You could tell users to use the "Grail" browser ;-), it can execute "Python Applets". The basic problem with web-browser-based applications is your users (web browsers) must have the required interpreter/libraries available. Sun did a good job selling java, so now all browsers include a java interpreter which allows them to run java applets. Browsers aren't including a python interpreter, which makes it harder to run python code. I would expect that, since Jython is written entirely in Java, and it outputs java code that any JVM can run stuff made with jython. Now we just have to solve all the java dependencies the browsers have. I did a bit more testing: I put my html file and the class files on a web server and tried to load them. I got NoClassDefFound errors for org/python/* classes. Ok, so the jython.jar file is needed in the class path. I ran jythonc with the --jar and --all options. This put my .class files and the jython .class files nicely into a single jar file. Trying again with codebase="myapplet" in the html file (I named the jar file myapplet.jar). Now I'm getting a ClassFormatError: HelloApplet (Bad magic number) error. I think this is related to compiler/interpreter versions. I have to do some work now, but I will try again later. I'm cc'ing the list in case anyone else can shed some light on the issue. -D |
From: syKim <re...@ne...> - 2001-02-02 22:13:33
|
DQp0aGFuayB5b3UgZm9yIEFyb25zc29uICYgRCBeIF4NCg0KSXQncyBhbG1vc3QgZG9uZS4uDQoN Ci0gSSB1c2VkIHlvdXIgY29kZSBidXQgY29tcGlsZWQgd2l0aA0KDQotIGp5dGhvb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iBhcHBsZXRzLg0KDQpIb3cgaXQgd29ya3M/DQoNCkhvdyBjYW4g SSBnZXQgbW9yZSBpbmZvcm1hdGlvbiBhYm91dCBpdD8NCg0KDQoNCg== |
From: D-Man <ds...@ri...> - 2001-02-02 23:31:47
|
On Sat, Feb 03, 2001 at 07:19:12AM +0900, syKim wrote: | | -You could tell users to use the "Grail" browser ;-), it can execute | -"Python Applets". The basic problem with web-browser-based | -applications is your users (web browsers) must have the required | -interpreter/libraries available. Sun did a good job selling java, so | -now all browsers include a java interpreter which allows them to run | -java applets. Browsers aren't including a python interpreter, which | -makes it harder to run python code. I would expect that, since Jython | -is written entirely in Java, and it outputs java code that any JVM can | -run stuff made with jython. Now we just have to solve all the java | -dependencies the browsers have. | | I don't know both "Grail" & python applets. | | How it works? | | How can I get more information about it? | Grail is a web browser written in python. You can find it on the python web site, maybe in the Vaults of Parnassus, and I think it is actually located on sourceforge (try http://grail.sourceforge.net). I don't think it is being actively maintained anymore though. Since Grail is written in python, it was made with the ability to run python applets. I don't know if they would need to be put in a zip file or what for the browser to get them. I think that using jython is the best solution for you since (almost) everybody has a web browser that can run java applets. -D |
From: Mats W. <ma...@la...> - 2001-02-03 08:51:11
|
> >Grail is a web browser written in python. You can find it on the >python web site, maybe in the Vaults of Parnassus, and I think it is >actually located on sourceforge (try http://grail.sourceforge.net). > >I don't think it is being actively maintained anymore though. Since >Grail is written in python, it was made with the ability to run python >applets. I don't know if they would need to be put in a zip file or >what for the browser to get them. Grail was a CNRI special, made particularly to demonstrate one of their particular concepts. You can get it by following the links on python.org, but be warned: it's very fragile, and there are no plans that I've heard of for anyone to fix it. I played with it for a while and concluded it was unusable. Mats |