From: Ype K. <yk...@xs...> - 2001-12-22 17:26:02
|
>hi all, > >This is my first post to the list. >Our company does'nt use python. many have'nt even heard of it. > >Ours is mainly a java shop. > >We have lots of internal training sessions @ our place. >Anyone with a decent knowledge of a particular subject can take such >sessions. >I was planning to take an introductory session on python. > >I feel irrespective of how good the language is, not many >w'd want to try it out unless and otherwise they can see lots of >supporting tools and libraries. > >it has to be 1 hour talk. I have picked up a few topics. > >Ours being a java shop, i feel, the most important topic would be jython. > >Any suggestion w'd be of great help to me. > >Please give me ideas of some simple demonstration i can do with jython. >Something that w'd've some effect on our guys. >I wrote small gui stuff in swing using jython. >I can probably show how the number of lines is far less that what you w'd >write for a >typical java swing application. > >I need more intutive stuff. How about a little interactive jython session exploring some of the java libraries you are using? You already have some gui stuff demonstrating swing, but other libraries can have similar treatment interactively, ie. no compilation needed: import your.preferred.package as p # should be on the class path. dir(p) dir(p.demoClass) # ie. some class in the package. obj = p.demoClass() # create an object. obj.toString() res = obj.someMethod('arg1', None) # invoke a method on the object. print res >am no expert, infact am a newbie but am comfortable woth python syntax, >features. >who wants to spread the usage of python/jython @ our place. Or write a few test cases using PyUnit, to show the compactness of python test code over java code doing the same thing. This might take some time investment, but testing is a very nice subject for interpreted code as normally the speed of the testing code is not important. The ability to quickly change sth in your testing code without having a compiler in between is also valuable in practice. >But unless i tell them how i managed to get something done easily using >jython, >they w'd'nt be impressed. When you can have jython.jar on the class path you might consider using it for some real work first and then showing it. >like some examples of what i can achieve by embedding the jython interpreter >inside my java code >in a very efficient manner. It is normally easier to start the other way round: invoking your java code from jython code. >Any inputs/ideas for the demo would be of great help to me. > >thanks, >karthik. Good luck, Ype |