You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(8) |
Dec
(51) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(105) |
Feb
(93) |
Mar
(194) |
Apr
(145) |
May
(100) |
Jun
(111) |
Jul
(117) |
Aug
(126) |
Sep
(233) |
Oct
(138) |
Nov
(164) |
Dec
(109) |
2002 |
Jan
(216) |
Feb
(175) |
Mar
(216) |
Apr
(194) |
May
(157) |
Jun
(140) |
Jul
(158) |
Aug
(73) |
Sep
(105) |
Oct
(164) |
Nov
(104) |
Dec
(95) |
2003 |
Jan
(72) |
Feb
(69) |
Mar
(81) |
Apr
(151) |
May
(101) |
Jun
(139) |
Jul
(99) |
Aug
(118) |
Sep
(115) |
Oct
(151) |
Nov
(161) |
Dec
(102) |
2004 |
Jan
(120) |
Feb
(175) |
Mar
(106) |
Apr
(111) |
May
(54) |
Jun
(78) |
Jul
(76) |
Aug
(105) |
Sep
(94) |
Oct
(143) |
Nov
(75) |
Dec
(85) |
2005 |
Jan
(99) |
Feb
(77) |
Mar
(164) |
Apr
(97) |
May
(79) |
Jun
(57) |
Jul
(65) |
Aug
(102) |
Sep
(95) |
Oct
(129) |
Nov
(123) |
Dec
(52) |
2006 |
Jan
(48) |
Feb
(99) |
Mar
(90) |
Apr
(51) |
May
(81) |
Jun
(136) |
Jul
(56) |
Aug
(109) |
Sep
(50) |
Oct
(44) |
Nov
(74) |
Dec
(75) |
2007 |
Jan
(92) |
Feb
(137) |
Mar
(93) |
Apr
(79) |
May
(52) |
Jun
(74) |
Jul
(143) |
Aug
(175) |
Sep
(154) |
Oct
(137) |
Nov
(88) |
Dec
(90) |
2008 |
Jan
(58) |
Feb
(113) |
Mar
(167) |
Apr
(88) |
May
(105) |
Jun
(37) |
Jul
(87) |
Aug
(72) |
Sep
(56) |
Oct
(41) |
Nov
(102) |
Dec
(70) |
2009 |
Jan
(115) |
Feb
(113) |
Mar
(126) |
Apr
(58) |
May
(125) |
Jun
(45) |
Jul
(90) |
Aug
(125) |
Sep
(84) |
Oct
(61) |
Nov
(111) |
Dec
(61) |
2010 |
Jan
(85) |
Feb
(86) |
Mar
(130) |
Apr
(58) |
May
(57) |
Jun
(32) |
Jul
(25) |
Aug
(50) |
Sep
(41) |
Oct
(65) |
Nov
(63) |
Dec
(24) |
2011 |
Jan
(43) |
Feb
(31) |
Mar
(28) |
Apr
(68) |
May
(53) |
Jun
(42) |
Jul
(58) |
Aug
(26) |
Sep
(51) |
Oct
(76) |
Nov
(60) |
Dec
(9) |
2012 |
Jan
(16) |
Feb
(32) |
Mar
(32) |
Apr
(39) |
May
(16) |
Jun
(19) |
Jul
(3) |
Aug
(11) |
Sep
(35) |
Oct
(47) |
Nov
(28) |
Dec
(18) |
2013 |
Jan
(18) |
Feb
(36) |
Mar
(10) |
Apr
(7) |
May
(7) |
Jun
(27) |
Jul
(17) |
Aug
(35) |
Sep
(19) |
Oct
(31) |
Nov
(8) |
Dec
(22) |
2014 |
Jan
(5) |
Feb
(11) |
Mar
(18) |
Apr
(23) |
May
(26) |
Jun
(14) |
Jul
(18) |
Aug
(26) |
Sep
(20) |
Oct
(48) |
Nov
(13) |
Dec
(9) |
2015 |
Jan
(9) |
Feb
(15) |
Mar
(25) |
Apr
(10) |
May
(26) |
Jun
(6) |
Jul
(13) |
Aug
(5) |
Sep
(14) |
Oct
(36) |
Nov
(24) |
Dec
(18) |
2016 |
Jan
(24) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
(7) |
Jun
(3) |
Jul
(9) |
Aug
(15) |
Sep
(22) |
Oct
(5) |
Nov
(5) |
Dec
(2) |
2017 |
Jan
(20) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(5) |
Jun
(7) |
Jul
(14) |
Aug
(9) |
Sep
(18) |
Oct
(2) |
Nov
(3) |
Dec
(3) |
2018 |
Jan
(7) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(18) |
Sep
(8) |
Oct
(9) |
Nov
(4) |
Dec
(6) |
2019 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
(8) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(5) |
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kieran B. <ki...@br...> - 2001-12-02 23:50:48
|
I've used this is the past: http://httpunit.sourceforge.net I did actually use Java to drive this as it ties into JUnit. But I *think* you could use jython with pyunit. I never tried this though. Let me know if you have any success. Kieran Breen |
From: Edward P. <epo...@te...> - 2001-12-02 01:18:32
|
Hi, I am writing a desktop environment for my app, and I wrote my own DesktopManager in java There are other objects in python that implement the actual desktop, frame windows etc. So I have: ite/wm/ITEDesktopManager.java ite/wm.py containing classes ITEDesktop, ITEContentPane etc. Jython doesn't know how to find ITEDesktopManager In interactive mode, I: import ite.wm but from some print statments in the __init__.py files, I can see that the folder containing the java source is not imported. Is this possible to do, or am I messing something up in my python path? Thanks -Ed |
From: <Arn...@si...> - 2001-12-01 22:04:10
|
> -----Urspr=FCngliche Nachricht----- > Von: dman [mailto:ds...@ri...] > Gesendet: Donnerstag, 29. November 2001 16:18 > An: jyt...@li... > Betreff: Re: [Jython-users] jythonc not working -- solved, but = strange >=20 >=20 > On Thu, Nov 29, 2001 at 07:45:01AM +0100, Humbel Otmar wrote: > | [ Arno.Schmidmeier / dman ] > |=20 > | > | The problem is simply: > | > | You write some lines of code with your favourite editor, on=20 > | > plattform A, the > | > | file gets stored as ascii + some local code enhancements. > | > | Then you transfer the files to a different=20 > plattform/mashine with a > | > | different codeset. > | > | In the best case the names of variables, etc. changed quite=20 > | > dramatically in > | > | the rest, just forget the result. > |=20 > | That's exactly my experience.=20 > | Please also consider file names with special characters - shudder. > | Only a small example: How many times has a blank in a=20 > windows file name > | broken up a *nix shell command of yours ? >=20 > That happens sometimes, but only if the app or script doesn't use > proper quoting techniques to guard against that (and similar things = -- > java class files like to have $ in their name, but that is also a > shell metacharacter). and also a valid ASCII-Character. However I vote against using $ in variable/class/package names, because = they might cause problems with third party tools, e.g. I have some OODBMSes = in mind. >=20 > | And there is another point: readability/maintainability. We=20 > have here a > | development team of people with various mother languages (in > | alphabetical order and hopefully spelled correctly): Dutch, = English, > | French, German, Italian, Slavish, Swiss German, Turkish,=20 > and maybe even > | more. > | If we would allow localized characters in source code, the=20 > chance would > | be high that poeple choose variable names in their mother=20 > language. The > | rest you can imagine. >=20 > I would expect that a multi-lingual development group would choose a > common language to code in, though for single-use throw away scripts, > or for students (or non-students) who want to begin programming it > could be helpful to use the native tongue. >=20 As a native german, I have never been in the need to use=20 these special characters, inside of the algorithm/code. > | > Certainly if two processes try and use different encodings for = the > | > same file, it won't work. That's what happened to me=20 > with jythonc -- > | > it was encoded in latin1 (though only a single character=20 > in a comment > | > was affect) but jython (java) was trying to read it as utf-8. > | >=20 > | > The developer's editors and environment must all be set=20 > to the correct > | > encoding. PEP 263 addresses that as far as the interpreter is > | > concerned. It is up to the developers to configure their editor > | > appropriately. > |=20 > | Beside the fact that there are systems where you simply=20 > cannot configure > | your editor, I think it is a matter of lowest common=20 > denominator, for > | the reasons above. >=20 > I understand what you are saying, though if I generalize it we should > never make progress because something already (incompatibly) exists. > I disagree with the view that we should not make progress (moving to > unicode, for example) just because some systems are incapable of > coping with it. IMO those systems should be fixed instead. > It is very fine to have source-code files stored in Unicode,=20 but it is not ok to have non ASCII-Characters in variables, etc. You can start to argue about values inside a string constant and = comments. (I thik it *might* be ok there), but not in the actual program!!!!! =20 > If native alphabets are allowed in identifiers, that doesn't prevent > you from exclusively using US-ASCII charaters. As I alluded to in my > "dumb american" comment, I only know English. Hence I will only be > using US-ASCII characters regardless of the outcome. Interestingly > enough, java allows other characters (umlauts, etc) in identifiers. = I > recently (just yesterday) got some source code that used such > characters in it. My system (the one at work) was not correctly set > up for utf-8 so many characters were turned into "?". That didn't > work too well. When I fixed my environment it looked much better = :-). >=20 > If the people whose language(s) contain non-US-ASCII characters don't > want those characters allowed in identifiers, then I have no problem > with it. I just thought it seemed a bit elitist (from an american > perspective anyways) to only allow US-ASCII characters. >=20 It is the same like spaces in filenames, how many shell scripts have = them=20 already broken? The little loss of convenience, pays in the long term very, very much. regards=20 Arno > -D >=20 > --=20 >=20 > It took the computational power of three Commodore 64s to fly=20 > to the moon. > It takes at least a 486 to run Windows 95. > Something is wrong here. >=20 >=20 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users >=20 |
From: Paul P. <pa...@pr...> - 2001-12-01 21:19:26
|
Samuele Pedroni wrote: > >... > > Java GUIs are thread-based and gc is not deterministic and can > happen in a different thread. Thanks! That was the clue I needed. I can stop pulling out my hair. SocketServer has these two innocuous seeming lines: def __del__(self): pass Deleting those fix my problem. I guess those two lines are enough to make my single threaded program multithreaded. The ironic thing is that I am debugging a debugger and one of the weird things that was happening is that the debugger pointer would jump randomly to SocketServer.__del__ before it crashed. I missed the hint until you mentioned GC. As you know, Python debuggers work by triggering events on each bytecode. When the events emanate from two threads at once, the debugger gets really confused. Thanks again for your help. Paul Prescod |
From: Robert W. <rob...@ho...> - 2001-12-01 21:15:59
|
Folks: Sorry if this is not the most appropriate list to post this query. I'm trying to write a jython script which will hammer a servlet I've been stuck with testing/debugging/fixing. In the servlet's doPost() method the first thing it does is: ServletInputStream stream = request.getInputStream() ( where request is the HttpServletRequest passed in ). Next it creates a DOMParser and does: parser.parse( new InputSource( stream ) ); Document xmlDoc = parser.getDocument() My question is: if I write a jython script which opens a socket to the web server (Apache Tomcat 4.0) and talks to the servlet, what do I pump through that socket so that the servlet gets a valid XML document by calling request.getInputStream()? I already know all the socket stuff, but I can't find any info anywhere on simulating browser POST requests to web servers. Thanks in advance, ---Rob Welch |
From: Samuele P. <ped...@bl...> - 2001-12-01 10:23:40
|
For the minimal common capability related to what you ask for applets see: http://java.sun.com/docs/books/tutorial/applet/appletsonly/index.html http://java.sun.com/docs/books/tutorial/applet/appletsonly/browser.html regards, Samuele Pedroni. ----- Original Message ----- From: Gary Herron <res...@ve...> To: dman <ds...@ri...>; <jyt...@li...> Sent: Friday, November 30, 2001 11:49 PM Subject: Re: [Jython-users] Questions about Jython and browser applets > Another applet related question: > > Can an applet communicate with or control the browser in which it is > running? Can it cause its own window or another (perhaps newly > created) window request and display a URL of its choosing? Can it > close down browser's window? Or can it communicate with javascript > where all these things are easily accomplished? > > Most importantly if any communication from an applet to the browser is > possible, what is a good resource to learn more about this? > > Thanks, > Gary. > > > > > On Thursday 29 November 2001 08:47 pm, dman wrote: > > On Thu, Nov 29, 2001 at 03:43:08PM -0800, Gary Herron wrote: > > | I'm very familiar with CPython, but I know almost nothing about > > | Jython, and even less about writing browser applets, so this brings me > > | to several questions. > > | > > | My application, which is mostly viewable on a browser as static web > > | pages and flash movies with a little javascript thrown in, now has a > > | need to execute a small amount of code on the users machine. I'd like > > | to write that code in Jython and have the user's browser download and > > | execute it as an applet. > > | > > | The hitch is that the applet must access things which, I think, are > > | not allowed for applets, such as > > > > what a hitch! > > > > | creation of files somewhere on the hard disk > > | calls to os.system -- does Jython even HAVE os.system or equiv? > > > > Not built-in, however this can be made from the java classes quite > > easily. I would paste in what I had, but I can't access that > > project's source right now (and I don't want to give you buggy stuff > > off the top of my head). > > > > | Is it true that suc access is not normally available from an applet? > > > > yes. > > > > | Is there a way to create applets that have this kind of access to the > > | user's system? > > > > yes. > > > > | Can the user decide, if he trusts me sufficiently, to grant an applet > > | such access? > > > > yes. To do so requires signing the applet, I think, so that the > > browser prompts the user to either grant or deny the permission. For > > galeon or mozilla on linux the user can create a ~/.java.policy file > > to give rights to an applet, regardless of whether or not it is > > signed. I used this to demo an applet I made that needed EJB > > and naming services. > > > > HTH, > > -D > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Samuele P. <ped...@bl...> - 2001-12-01 10:12:22
|
Hi. > I was debugging a really mysterious bug in a program that I am porting > to Jython. Most things worked great right out of the box. There were a > few differences but they were very minor. But then the mysterious bug > hit. Code seemed to be executing in random order! For instance I > inserted some print statements with numbers and they would print as > > 1 > 2 > 3 > 4 > 5 > 6 > 1 > 2 > 3 > 7 > 8 > 4 > 5 > 6 > 9 > > That's pretty clearly a threading issue! But I'm not (consciously!) > creating any threads. Under what circumstances would Jython or Java > create threads for me? Maybe when I do socket calls or something? Java GUIs are thread-based and gc is not deterministic and can happen in a different thread. Some image/bitmap loading APIs, designed for browser or applets do start threads for performing the loading in background. Sockets unless you already have multiple threads should not do anything that make you wonder: threads? Jython (apart from the new weakref support in the CVS) do not creates threads. Without some further info we cannot help you more, unless someone else can add something to the list (?) regards, Samuele Pedroni |
From: Edward P. <epo...@te...> - 2001-12-01 08:14:05
|
Thanks for the ideas. I tried them all, still the same thing. It all checks out. But I have discovered that for some reason, preferredSize is not being used in the layout, so in the end it is a Swing thing - custom controls are always "fun" with a new language. Thanks -Ed ----- Original Message ----- From: "Kevin Butler" <kb...@ca...> To: "Edward Povazan" <epo...@te...> Cc: <jyt...@li...> Sent: Friday, November 30, 2001 9:56 AM Subject: Re: [Jython-users] Wacky assignment doesn't take value > I think you'll probably need to describe what the behavior is when it doesn't work. > > The following: > > from javax.swing import JButton > x = JButton() > w= x.width + 10 > h= x.height + 10 > x.preferredSize = w,h > print x.preferredSize > > Gives the expected output: > > java.awt.Dimension[width=10,height=10] > > > Pure speculation: try printing type( w ) - is it a PyInteger? > > kb > > Edward Povazan wrote: > > > > Hi, > > > > Anyone know what is going on here? I am setting preferredSize on a JButton. > > This doesn't work: > > w=self.__tree.width > > h=self.__nodeRenderer.preferredSize.height > > self.__nodeRenderer.preferredSize = w,h > > Changing the last line > > self.__nodeRenderer.preferredSize = 300,h > > works. > > > > How is this possible? Also, a print statement prints the correct value in > > both cases. Very strange. > > > > Thanks > > -Ed > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Paul P. <pa...@pr...> - 2001-12-01 07:11:02
|
I was debugging a really mysterious bug in a program that I am porting to Jython. Most things worked great right out of the box. There were a few differences but they were very minor. But then the mysterious bug hit. Code seemed to be executing in random order! For instance I inserted some print statements with numbers and they would print as 1 2 3 4 5 6 1 2 3 7 8 4 5 6 9 That's pretty clearly a threading issue! But I'm not (consciously!) creating any threads. Under what circumstances would Jython or Java create threads for me? Maybe when I do socket calls or something? Paul Prescod |
From: dman <ds...@ri...> - 2001-12-01 03:38:39
|
On Fri, Nov 30, 2001 at 02:49:38PM -0800, Gary Herron wrote: | Another applet related question: | | Can an applet communicate with or control the browser in which it is | running? Can it cause its own window or another (perhaps newly | created) window request and display a URL of its choosing? Can it | close down browser's window? Or can it communicate with javascript | where all these things are easily accomplished? Take a look at the mozilla site and look for "rhino". Supposedly it is possible to connect java and javascript in the browser. You can, of course, popup a new JFrame if you want, but it doesn't sound like that is what you mean by "window". | Most importantly if any communication from an applet to the browser is | possible, what is a good resource to learn more about this? Other than the mention I've seen of rhino, I have no idea. I've never done javascript myself. As a user, though, I hate sites that use javascript to try and control when I can and can't see things in certain windows. -D -- Even youths grow tired and weary, and young men stumble and fall; but those who hope in the Lord will renew their strength. They will soar on wings like eagles; they will run and not grow weary, they will walk and not be faint. Isaiah 40:31 |
From: Gary H. <res...@ve...> - 2001-11-30 22:58:16
|
Another applet related question: Can an applet communicate with or control the browser in which it is running? Can it cause its own window or another (perhaps newly created) window request and display a URL of its choosing? Can it close down browser's window? Or can it communicate with javascript where all these things are easily accomplished? Most importantly if any communication from an applet to the browser is possible, what is a good resource to learn more about this? Thanks, Gary. On Thursday 29 November 2001 08:47 pm, dman wrote: > On Thu, Nov 29, 2001 at 03:43:08PM -0800, Gary Herron wrote: > | I'm very familiar with CPython, but I know almost nothing about > | Jython, and even less about writing browser applets, so this brings me > | to several questions. > | > | My application, which is mostly viewable on a browser as static web > | pages and flash movies with a little javascript thrown in, now has a > | need to execute a small amount of code on the users machine. I'd like > | to write that code in Jython and have the user's browser download and > | execute it as an applet. > | > | The hitch is that the applet must access things which, I think, are > | not allowed for applets, such as > > what a hitch! > > | creation of files somewhere on the hard disk > | calls to os.system -- does Jython even HAVE os.system or equiv? > > Not built-in, however this can be made from the java classes quite > easily. I would paste in what I had, but I can't access that > project's source right now (and I don't want to give you buggy stuff > off the top of my head). > > | Is it true that suc access is not normally available from an applet? > > yes. > > | Is there a way to create applets that have this kind of access to the > | user's system? > > yes. > > | Can the user decide, if he trusts me sufficiently, to grant an applet > | such access? > > yes. To do so requires signing the applet, I think, so that the > browser prompts the user to either grant or deny the permission. For > galeon or mozilla on linux the user can create a ~/.java.policy file > to give rights to an applet, regardless of whether or not it is > signed. I used this to demo an applet I made that needed EJB > and naming services. > > HTH, > -D |
From: Kevin B. <kb...@ca...> - 2001-11-30 17:57:04
|
I think you'll probably need to describe what the behavior is when it doesn't work. The following: from javax.swing import JButton x = JButton() w= x.width + 10 h= x.height + 10 x.preferredSize = w,h print x.preferredSize Gives the expected output: java.awt.Dimension[width=10,height=10] Pure speculation: try printing type( w ) - is it a PyInteger? kb Edward Povazan wrote: > > Hi, > > Anyone know what is going on here? I am setting preferredSize on a JButton. > This doesn't work: > w=self.__tree.width > h=self.__nodeRenderer.preferredSize.height > self.__nodeRenderer.preferredSize = w,h > Changing the last line > self.__nodeRenderer.preferredSize = 300,h > works. > > How is this possible? Also, a print statement prints the correct value in > both cases. Very strange. > > Thanks > -Ed > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Paul G. <pau...@so...> - 2001-11-30 09:22:15
|
> If the people whose language(s) contain non-US-ASCII characters don't > want those characters allowed in identifiers, then I have no problem > with it. I just thought it seemed a bit elitist (from an american > perspective anyways) to only allow US-ASCII characters. -D ... and I guarantee you that the rest of the world appreciates your attitude, as this is an area where we American have traditionally had a bad reputation. However the point is academic. In reality, English is generally accepted as a prerequisite to computer programming everywhere in the world. 10 years ago, when I first moved to Switzerland, I also thought as you do, but I learned that things are quite different. The bulk of all literature in the IT field is written in English, and things move so fast that translation is useless - the information is outdated by the time the translation is available. The situation is self-fullfilling in that people who write in the IT field (books, articles, manuals) will often prefer to write in English, no matter what their native language is. Why make the effort to write in, for example, German have your potential audience limited to Central Europe, when you can write in English and have a worldwide audience? I have met developers from places as 'exotic' as Iran, and even there they have to be able to read english language software manuals. Umlauts in identifiers? I think most programer would figure out pretty quickly that this is just asking for trouble - like putting spaces in file names. Smart people would avoid it even if it were allowed. Multi-national projects teams, like the one described by Oti, are common in Europe (I dare to say even, that they are the rule) so it is common for coding standards to require all code, comments and docu to be in English I am really glad to have been born with the right native language, even if does land me a lot of proofreading work on the side ;-). So the point is, IMHO, that internationalization is primarily for the benefit of the end-users of software products. It is a given that software developers can work in English. I have not yet met anyone who has a problem with this, and I do not see the situation changing in the foreseeable future. BTW, my company markets middleware products worldwide, and we only provide English documentation. No one has ever, to my knowledge, requested a translation. -Paul |
From: dman <ds...@ri...> - 2001-11-30 04:47:41
|
On Thu, Nov 29, 2001 at 03:43:08PM -0800, Gary Herron wrote: | I'm very familiar with CPython, but I know almost nothing about | Jython, and even less about writing browser applets, so this brings me | to several questions. | | My application, which is mostly viewable on a browser as static web | pages and flash movies with a little javascript thrown in, now has a | need to execute a small amount of code on the users machine. I'd like | to write that code in Jython and have the user's browser download and | execute it as an applet. | | The hitch is that the applet must access things which, I think, are | not allowed for applets, such as what a hitch! | creation of files somewhere on the hard disk | calls to os.system -- does Jython even HAVE os.system or equiv? Not built-in, however this can be made from the java classes quite easily. I would paste in what I had, but I can't access that project's source right now (and I don't want to give you buggy stuff off the top of my head). | Is it true that suc access is not normally available from an applet? yes. | Is there a way to create applets that have this kind of access to the | user's system? yes. | Can the user decide, if he trusts me sufficiently, to grant an applet | such access? yes. To do so requires signing the applet, I think, so that the browser prompts the user to either grant or deny the permission. For galeon or mozilla on linux the user can create a ~/.java.policy file to give rights to an applet, regardless of whether or not it is signed. I used this to demo an applet I made that needed EJB and naming services. HTH, -D -- A)bort, R)etry, D)o it right this time |
From: Edward P. <epo...@te...> - 2001-11-30 02:53:56
|
Hi, Anyone know what is going on here? I am setting preferredSize on a JButton. This doesn't work: w=self.__tree.width h=self.__nodeRenderer.preferredSize.height self.__nodeRenderer.preferredSize = w,h Changing the last line self.__nodeRenderer.preferredSize = 300,h works. How is this possible? Also, a print statement prints the correct value in both cases. Very strange. Thanks -Ed |
From: Gary H. <res...@ve...> - 2001-11-29 23:49:41
|
I'm very familiar with CPython, but I know almost nothing about Jython, and even less about writing browser applets, so this brings me to several questions. My application, which is mostly viewable on a browser as static web pages and flash movies with a little javascript thrown in, now has a need to execute a small amount of code on the users machine. I'd like to write that code in Jython and have the user's browser download and execute it as an applet. The hitch is that the applet must access things which, I think, are not allowed for applets, such as creation of files somewhere on the hard disk calls to os.system -- does Jython even HAVE os.system or equiv? Is it true that suc access is not normally available from an applet? Is there a way to create applets that have this kind of access to the user's system? Can the user decide, if he trusts me sufficiently, to grant an applet such access? Thanks for any help, Gary Herron Island Training Solutions |
From: dman <ds...@ri...> - 2001-11-29 15:17:59
|
On Thu, Nov 29, 2001 at 07:45:01AM +0100, Humbel Otmar wrote: | [ Arno.Schmidmeier / dman ] | | > | The problem is simply: | > | You write some lines of code with your favourite editor, on | > plattform A, the | > | file gets stored as ascii + some local code enhancements. | > | Then you transfer the files to a different plattform/mashine with a | > | different codeset. | > | In the best case the names of variables, etc. changed quite | > dramatically in | > | the rest, just forget the result. | | That's exactly my experience. | Please also consider file names with special characters - shudder. | Only a small example: How many times has a blank in a windows file name | broken up a *nix shell command of yours ? That happens sometimes, but only if the app or script doesn't use proper quoting techniques to guard against that (and similar things -- java class files like to have $ in their name, but that is also a shell metacharacter). | And there is another point: readability/maintainability. We have here a | development team of people with various mother languages (in | alphabetical order and hopefully spelled correctly): Dutch, English, | French, German, Italian, Slavish, Swiss German, Turkish, and maybe even | more. | If we would allow localized characters in source code, the chance would | be high that poeple choose variable names in their mother language. The | rest you can imagine. I would expect that a multi-lingual development group would choose a common language to code in, though for single-use throw away scripts, or for students (or non-students) who want to begin programming it could be helpful to use the native tongue. | > Certainly if two processes try and use different encodings for the | > same file, it won't work. That's what happened to me with jythonc -- | > it was encoded in latin1 (though only a single character in a comment | > was affect) but jython (java) was trying to read it as utf-8. | > | > The developer's editors and environment must all be set to the correct | > encoding. PEP 263 addresses that as far as the interpreter is | > concerned. It is up to the developers to configure their editor | > appropriately. | | Beside the fact that there are systems where you simply cannot configure | your editor, I think it is a matter of lowest common denominator, for | the reasons above. I understand what you are saying, though if I generalize it we should never make progress because something already (incompatibly) exists. I disagree with the view that we should not make progress (moving to unicode, for example) just because some systems are incapable of coping with it. IMO those systems should be fixed instead. If native alphabets are allowed in identifiers, that doesn't prevent you from exclusively using US-ASCII charaters. As I alluded to in my "dumb american" comment, I only know English. Hence I will only be using US-ASCII characters regardless of the outcome. Interestingly enough, java allows other characters (umlauts, etc) in identifiers. I recently (just yesterday) got some source code that used such characters in it. My system (the one at work) was not correctly set up for utf-8 so many characters were turned into "?". That didn't work too well. When I fixed my environment it looked much better :-). If the people whose language(s) contain non-US-ASCII characters don't want those characters allowed in identifiers, then I have no problem with it. I just thought it seemed a bit elitist (from an american perspective anyways) to only allow US-ASCII characters. -D -- It took the computational power of three Commodore 64s to fly to the moon. It takes at least a 486 to run Windows 95. Something is wrong here. |
From: rpcee <rp...@op...> - 2001-11-29 13:42:04
|
afraid so, see 4.10 in http://java.sun.com/docs/books/vmspec/html/ClassFile.doc.html |
From: Humbel O. <Otm...@bi...> - 2001-11-29 06:45:15
|
[ Arno.Schmidmeier / dman ] > | The problem is simply: > | You write some lines of code with your favourite editor, on=20 > plattform A, the > | file gets stored as ascii + some local code enhancements. > | Then you transfer the files to a different plattform/mashine with a > | different codeset. > | In the best case the names of variables, etc. changed quite=20 > dramatically in > | the rest, just forget the result. That's exactly my experience.=20 Please also consider file names with special characters - shudder. Only a small example: How many times has a blank in a windows file name broken up a *nix shell command of yours ? And there is another point: readability/maintainability. We have here a development team of people with various mother languages (in alphabetical order and hopefully spelled correctly): Dutch, English, French, German, Italian, Slavish, Swiss German, Turkish, and maybe even more. If we would allow localized characters in source code, the chance would be high that poeple choose variable names in their mother language. The rest you can imagine. =20 > Certainly if two processes try and use different encodings for the > same file, it won't work. That's what happened to me with jythonc -- > it was encoded in latin1 (though only a single character in a comment > was affect) but jython (java) was trying to read it as utf-8. >=20 > The developer's editors and environment must all be set to the correct > encoding. PEP 263 addresses that as far as the interpreter is > concerned. It is up to the developers to configure their editor > appropriately. Beside the fact that there are systems where you simply cannot configure your editor, I think it is a matter of lowest common denominator, for the reasons above. Best wishes, Oti. |
From: Edward P. <epo...@te...> - 2001-11-29 06:36:30
|
Hi, Being used to the Java one public class per file system, I am wondering what the normal way of packaging Python modules is. I am using the OOP parts of Python, so I have a file ABCD containing a class ABCD ... in it. Of course, importing looks stupid: from ABCD import ABCD and so on Is this the only way to do things? I have a bunch of UI widgets in a folder named "ui", with files containing one class each. Seems that to emulate a Java style package usage, I would have to copy all the widgets source into a file called ui.py so as to from ui import * Am I missing something completely? Thanks -Ed |
From: dman <ds...@ri...> - 2001-11-29 00:13:46
|
On Wed, Nov 28, 2001 at 11:55:59PM +0100, Arn...@si... wrote: | > Von: dman [mailto:ds...@ri...] | > | > On Wed, Nov 28, 2001 at 07:58:47AM +0100, Humbel Otmar wrote: | > | [ Finn Bock ] | > | | > | > Non-ascii chars in identifiers? I know CPython sometimes | > | > allow that, but | > | > that is not a feature I plan on adding. | > | | > | please please NEVER even think of allowing that. Avoid special | > | characters (as Umlaute) as long as you can - they simply kill | > | developer productivity. | > | > Could you give an example? | > | > I would have thought that allowing non-english developers to use their | > native language would be nice, but I'm just a "dumb american" (if you | > know what I mean) so it really doesn't hurt me either way. | | The problem is simply: | You write some lines of code with your favourite editor, on plattform A, the | file gets stored as ascii + some local code enhancements. | Then you transfer the files to a different plattform/mashine with a | different codeset. | In the best case the names of variables, etc. changed quite dramatically in | the rest, just forget the result. Certainly if two processes try and use different encodings for the same file, it won't work. That's what happened to me with jythonc -- it was encoded in latin1 (though only a single character in a comment was affect) but jython (java) was trying to read it as utf-8. The developer's editors and environment must all be set to the correct encoding. PEP 263 addresses that as far as the interpreter is concerned. It is up to the developers to configure their editor appropriately. -D -- A)bort, R)etry, D)o it right this time |
From: <Arn...@si...> - 2001-11-28 22:56:27
|
Hello dman, hello everybody, The problem is simply: You write some lines of code with your favourite editor, on plattform = A, the file gets stored as ascii + some local code enhancements. Then you transfer the files to a different plattform/mashine with a different codeset. In the best case the names of variables, etc. changed quite = dramatically in the rest, just forget the result. Arno > -----Urspr=FCngliche Nachricht----- > Von: dman [mailto:ds...@ri...] > Gesendet: Mittwoch, 28. November 2001 18:21 > An: jyt...@li... > Betreff: Re: [Jython-users] jythonc not working -- solved, but = strange >=20 >=20 > On Wed, Nov 28, 2001 at 07:58:47AM +0100, Humbel Otmar wrote: > | [ Finn Bock ] > |=20 > | > Non-ascii chars in identifiers? I know CPython sometimes=20 > | > allow that, but > | > that is not a feature I plan on adding. > |=20 > | please please NEVER even think of allowing that. Avoid special > | characters (as Umlaute) as long as you can - they simply=20 > kill developer > | productivity. >=20 > Could you give an example? >=20 > I would have thought that allowing non-english developers to use = their > native language would be nice, but I'm just a "dumb american" (if you > know what I mean) so it really doesn't hurt me either way. >=20 > -D >=20 > --=20 >=20 > Windows, hmmm, does it come with a GUI interface that works or just > pretty blue screens? >=20 >=20 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users >=20 |
From: Prathibha <pr...@ya...> - 2001-11-28 22:32:11
|
I have python code in the DB, which I retrieve at runtime, and run it using the python interpreter which I presume compiles and then interprets the code. I want to know if there is anyway I can store compiled python script in the DB and just interpret it at runtime rather than also compile it. Presently I use jython and want to test this on the windows as well as the unix environment. thanks Pratibha __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 |
From: <Arn...@si...> - 2001-11-28 18:56:05
|
I agree, totally. A good friend of mine, ha also following nice sayings: Anybody who uses these special characters in variable names, kills = small children. regards=20 Arno > -----Urspr=FCngliche Nachricht----- > Von: Humbel Otmar [mailto:Otm...@bi...] > Gesendet: Mittwoch, 28. November 2001 07:59 > An: jyt...@li... > Betreff: RE: [Jython-users] jythonc not working -- solved, but = strange >=20 >=20 > [ Finn Bock ] >=20 > > Non-ascii chars in identifiers? I know CPython sometimes=20 > > allow that, but > > that is not a feature I plan on adding. >=20 > please please NEVER even think of allowing that. Avoid special > characters (as Umlaute) as long as you can - they simply kill=20 > developer > productivity. >=20 > Thanks ! > Oti, >=20 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users >=20 |
From: dman <ds...@ri...> - 2001-11-28 17:24:49
|
On Mon, Nov 26, 2001 at 08:25:12PM +0000, Finn Bock wrote: | [dman] | | >| As an additional information point, my JDK1.2 and JDK1.3 also throws | >| exceptions, but JDK1.4 silently transform the character into the | >| unicode-undefined character. | > | >I'm not sure that is a good thing (jdk1.4), but maybe you don't have | >to deal with it. Consider someone who has some source in latin1 (or | >something else) and has | > | >a=F6c =3D "foo" | >a=FCc =3D "bar" | | [I find it a little ironic that my mail agent can't deal any of the | newer mail encodings] I didn't do anything special with my mailer (mutt), but it shows the message as "ISO-8859-1" encoded. I simply picked to characters near the end of the latin1 encoding. They are vowels with some funny decorations (I think they're called umlauts, but I'm really not sure). I use vim 6 (with the less.vim macro) as my pager, and it showed it correctly. Interestingly enough, that copy of vim was built without multibyte support, so the 'enc' and 'fenc' settings weren't available. | >If java uses UTF-8 as the encoding, then those two names | | Non-ascii chars in identifiers? I know CPython sometimes allow that, but | that is not a feature I plan on adding. I thought that would be nice to have for non-english developers, but someone has already said otherwise. | >will end up | >being the same if jython will treat the unicode-undefined character as | >a regular character. This would be an additional condition that | >should raise an exception. | | If you put the non-ascii chars inside the quotes then I agree with your | example and with your conclusion. Yeah, that would do it too. | >| Yes. The generated tokenmanager catches all IOExceptions | >| (MalformedInputException is a subclass of IOException) and interprets | >| that as eof. | > [...] | > | >Couldn't you just catch that exception and print out a message then | >exit right before catching IOException? | | There are 43 instances of caught IOException in | PythonGrammerTokenManager such as: | | try { curChar = input_stream.readChar(); } | catch(java.io.IOException e) { | jjStopStringLiteralDfa_10(0, 0L, active1); | return 1; | } | | We probably have to catch the MalformedInputException in the | ReaderCharStream and throw something that will get passed most of the | catch clauses in the parser. What if the exception gets turned into IOError (the python exception)? I just noticed that you said "generated" parser. That may make it easier or harder to add the proper catches. I should probably file a bug report, right? -D -- (E)ighteen (M)egs (A)nd (C)onstantly (S)wapping |