|
From: jai <mj...@sr...> - 2004-01-02 09:15:33
|
Hi
using jython i tried to read a java file but it is not able to read
but insted of java file if i give i text file it is reading.
Can u plse tell me the resaon for it
regards
jai
----- Original Message -----
From: <jyt...@li...>
To: <jyt...@li...>
Sent: Thursday, January 01, 2004 12:57 PM
Subject: Jython-users digest, Vol 1 #1001 - 3 msgs
> Send Jython-users mailing list submissions to
> jyt...@li...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/jython-users
> or, via email, send a message with subject or body 'help' to
> jyt...@li...
>
> You can reach the person managing the list at
> jyt...@li...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Jython-users digest..."
>
>
> Today's Topics:
>
> 1. How to add java class ............ (jai)
> 2. how to implement zope page template with java
(liu...@ho...)
> 3. RE: How to add java class ............ (liu...@ho...)
>
> --__--__--
>
> Message: 1
> From: "jai" <mj...@sr...>
> To: <jyt...@li...>
> Date: Mon, 15 Dec 2003 15:20:54 +0530
> Subject: [Jython-users] How to add java class ............
>
> Hi
> I have created a java class. using jython i imported that java
class
> in command prompt which works well.But if i try the same thing using the
> python idle(GUI) it is not working for me,it simply throws module not
found
> error.
> can u plse help me in this.
>
> waiting for ur reply.
> regards
> jai
>
> ----- Original Message -----
> From: <jyt...@li...>
> To: <jyt...@li...>
> Sent: Tuesday, December 30, 2003 9:47 AM
> Subject: Jython-users digest, Vol 1 #999 - 5 msgs
>
>
> > Send Jython-users mailing list submissions to
> > jyt...@li...
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://lists.sourceforge.net/lists/listinfo/jython-users
> > or, via email, send a message with subject or body 'help' to
> > jyt...@li...
> >
> > You can reach the person managing the list at
> > jyt...@li...
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Jython-users digest..."
> >
> >
> > Today's Topics:
> >
> > 1. information needed (jai)
> > 2. RE: Fw: Connecting Ms Excel (Sells, Fred)
> > 3. RE: Fw: Connecting Ms Excel (Updike, Clark)
> > 4. Re: no code object error with BSFManager.eval() (Si Chen)
> > 5. How to make jython work with UTF-8 (Dipankar Das)
> >
> > -- __--__--
> >
> > Message: 1
> > From: "jai" <mj...@sr...>
> > To: <Jyt...@li...>
> > Date: Mon, 15 Dec 2003 11:59:33 +0530
> > Subject: [Jython-users] information needed
> >
> >
> > This is a multi-part message in MIME format.
> >
> > ------=_NextPart_000_0010_01C3C302.E7765A30
> > Content-Type: text/plain;
> > charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > Hi
> > I have given an task to check the methods in java using =
> > jython.
> > Can u plse tell me how to check the following conditions using jython
> > a.. Check abnormal termination of all loops=20
> >
> > b.. Check normal termination of all recursions=20
> >
> > c.. Check abnormal termination of all recursions=20
> >
> > Waiting for the reply.
> > regards
> > jai
> >
> >
> > ------=_NextPart_000_0010_01C3C302.E7765A30
> > Content-Type: text/html;
> > charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD>
> > <META content=3D"text/html; charset=3Diso-8859-1" =
> > http-equiv=3DContent-Type>
> > <META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
> > <STYLE></STYLE>
> > </HEAD>
> > <BODY bgColor=3D#ffffff>
> > <DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
> > <DIV><FONT face=3DArial=20
> > size=3D2> I have =
> > given an=20
> > task to check the methods in java using jython.</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>Can u plse tell me how to check the =
> > following=20
> > conditions using jython</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>
> > <LI>Check abnormal termination of all loops <BR>
> > <LI>Check normal termination of all recursions <BR>
> > <LI>Check abnormal termination of all recursions <BR></LI></DIV>
> > <DIV>Waiting for the reply.</DIV>
> > <DIV>regards</DIV>
> > <DIV>jai</DIV>
> > <DIV></FONT> </DIV></BODY></HTML>
> >
> > ------=_NextPart_000_0010_01C3C302.E7765A30--
> >
> >
> >
> > -- __--__--
> >
> > Message: 2
> > From: "Sells, Fred" <fr...@ad...>
> > To: jyt...@li...
> > Subject: RE: [Jython-users] Fw: Connecting Ms Excel
> > Date: Mon, 29 Dec 2003 12:09:39 -0500
> >
> > seems to me you can setup an ODBC link to Excel, then use the JDBC-ODBC
> > bridge to get a JDBC connection to ODBC.
> >
> > -----Original Message-----
> > From: Updike, Clark [mailto:Cla...@jh...]
> > Sent: Wednesday, December 17, 2003 12:23 AM
> > To: jyt...@li...
> > Subject: RE: [Jython-users] Fw: Connecting Ms Excel
> > Importance: Low
> >
> >
> > If your using wxpython to access excel and want to keep doing that,
> > your only hope might be cyphon, which is probably vaporware:
> >
> > <http://lists.wxwindows.org/archive/wxPython-users/msg09122.html>
> >
> > <http://www.geocrawler.com/archives/3/7017/2002/10/0/10030291/>
> >
> > If you can give up wxpython, I've heard POI is decent. Since it's
> > just java, you can use it from jython. I'm sure there are others:
> >
> >
<http://www.javaworld.com/javaworld/javaqa/2002-05/01-qa-0503-excel3.html>
> >
> > Google is your friend...
> > search on: jython excel
> > jython wxpython
> >
> > -Clark
> >
> > -----Original Message-----
> > From: Subbu
> > Sent: Tuesday, December 16, 2003 11:43 PM
> > Subject: [Jython-users] Fw: Connecting Ms Excel
> >
> > Hi,
> >
> > I am currently working onJython and developing a test module for the
Java
> > application we have. I would like to connect to Ms Excel and retrieve
data
> > from it for further testing. I beleive it is possible because i have
done
> it
> > in Python using win32com.client. Now, how do i do it in Jython...
> >
> > Awaiting reply and thanx in advance
> >
> > Regards & Thanks
> >
> > Subramanian.S (SSB)
> > *: 91 - 44 - 2825 5541 Extn.2023
> > S R A S Y S T E M S L I MI T E D
> >
> > Start from where you are not from where you want to be.
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: IBM Linux Tutorials.
> > Become an expert in LINUX or just sharpen your skills. Sign up for
IBM's
> > Free Linux Tutorials. Learn everything from the bash shell to sys
admin.
> > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> > _______________________________________________
> > Jython-users mailing list
> > Jyt...@li...
> > https://lists.sourceforge.net/lists/listinfo/jython-users
> >
> >
> > -- __--__--
> >
> > Message: 3
> > From: "Updike, Clark" <Cla...@jh...>
> > To: "'Sells, Fred'" <fr...@ad...>
> > Cc: "'jyt...@li...'"
> > <jyt...@li...>
> > Subject: RE: [Jython-users] Fw: Connecting Ms Excel
> > Date: Mon, 29 Dec 2003 12:28:46 -0500
> >
> > Good point, since read-only capability is all that is needed.
> > The ODBC interface only supports very limited sql functionality
> > but I think quering data off of a sheet is do-able.
> >
> > I don't know if this document applies to later versions of
> > Excel (article is dated 1999), but it lists some of the
> > limitations at that time:
> >
> > <http://support.microsoft.com/default.aspx?scid=kb;en-us;178717>
> >
> > I believe that with POI you could even read an excel file on
> > non-MS platforms (it works at the binary file level)--if that
> > matters.
> >
> > -Clark
> >
> > -----Original Message-----
> > From: Sells, Fred
> > Sent: Monday, December 29, 2003 12:10 PM
> > To: jyt...@li...
> > Subject: RE: [Jython-users] Fw: Connecting Ms Excel
> >
> >
> > seems to me you can setup an ODBC link to Excel, then use the
> > JDBC-ODBC bridge to get a JDBC connection to ODBC.
> >
> > -----Original Message-----
> > From: Updike, Clark
> > Sent: Wednesday, December 17, 2003 12:23 AM
> > To: jyt...@li...
> > Subject: RE: [Jython-users] Fw: Connecting Ms Excel
> > Importance: Low
> >
> >
> > If your using wxpython to access excel and want to keep doing that,
> > your only hope might be cyphon, which is probably vaporware:
> >
> > <http://lists.wxwindows.org/archive/wxPython-users/msg09122.html>
> >
> > <http://www.geocrawler.com/archives/3/7017/2002/10/0/10030291/>
> >
> > If you can give up wxpython, I've heard POI is decent. Since it's just
> > java, you can use it from jython. I'm sure there are others:
> >
> >
<http://www.javaworld.com/javaworld/javaqa/2002-05/01-qa-0503-excel3.html>
> >
> > Google is your friend...
> > search on: jython excel
> > jython wxpython
> >
> > -Clark
> >
> > -----Original Message-----
> > From: Subbu
> > Sent: Tuesday, December 16, 2003 11:43 PM
> > Subject: [Jython-users] Fw: Connecting Ms Excel
> >
> > Hi,
> >
> > I am currently working onJython and developing a test module for the
Java
> > application we have. I would like to connect to Ms Excel and retrieve
data
> > from it for further testing. I beleive it is possible because i have
done
> it
> > in Python using win32com.client. Now, how do i do it in Jython...
> >
> > Awaiting reply and thanx in advance
> >
> > Regards & Thanks
> >
> > Subramanian.S (SSB)
> > *: 91 - 44 - 2825 5541 Extn.2023
> > S R A S Y S T E M S L I MI T E D
> >
> >
> >
> >
> > -- __--__--
> >
> > Message: 4
> > Date: Mon, 29 Dec 2003 14:22:10 -0800
> > From: Si Chen <sc...@gr...>
> > Reply-To: sc...@gr...
> > Organization: Gracious Style
> > To: jyt...@li...
> > Subject: Re: [Jython-users] no code object error with BSFManager.eval()
> >
> > Si Chen wrote:
> >
> > > Jeff,
> > >
> > > You're right! It is in the PythonInterpreter class. Apparently:
> > > String script = "print \"hello\"";
> > > PythonInterpreter py = new PythonInterpreter();
> > > py.exec(script);
> > > Object o = py.eval(script);
> > >
> > > The .exec method prints "hello" and .eval method gives the no code
> > > object error. So I guess .eval can only evaluate an expression. In
> > > that case, is this method only to be used for very simple things such
> > > as an assignment or arithmetic expression? Would it be possible to
> > > use it to define and then evaluate a function or method which returns
> > > a value?
> > >
> > > Thanks for getting back to me,
> > >
> > > Si
> > >
> > > Jeff Emanuel wrote:
> > >
> > >> I don't know about BSF, but with a PythonInterpreter
> > >> object, you can only eval expressions. print is not
> > >> an expression but a statement. I guess that the compile
> > >> failed because of print is not an expression returning
> > >> a null code object. Then the bsf manager complained about
> > >> the code object being null.
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: Si Chen
> > >> To: jyt...@li...
> > >> Sent: 12/24/2003 6:09 PM
> > >> Subject: [Jython-users] no code object error with BSFManager.eval()
> > >>
> > >> Hello. Can someone explain to me what the "no code object" error in
> > >> Jython is supposed to mean?
> > >>
> > >> Specifically, I have this really simple script (it does run in the
> > >> Jython interpreter):
> > >> print "hello"
> > >> return "success"
> > >>
> > >> I am trying to invoke it from Java using the IBM/Apache BSF framework
> > >> (http://oss.software.ibm.com/developerworks/projects/bsf), running it
> > >> like this from java:
> > >>
> > >> import com.ibm.bsf.BSFManager;
> > >> //...
> > >> BSFManager bsfManager = new BSFManager();
> > >> //...
> > >> Object result = bsfManager.eval(scriptType, locationName, 0, 0,
> > >> scriptString);
> > >>
> > >> in debugging,
> > >> scriptType is jython
> > >> locationName is where the script is located
> > >> scriptString is the text of the script
> > >>
> > >> I get a "no code object" error from jython, followed by:
> > >> print "hello"
> > >> ^
> > >> Syntax error
> > >>
> > >> I hunted around and did not get a clear explanation of what "no code
> > >> object error" might mean. If anyone knows what might be causing, I
> > >> would really appreciate it. If anyone knows why bsfManager is doing
> > >> this, that woudl be great too.
> > >>
> > >> Thanks,
> > >>
> > >> Si
> > >>
> > >>
> > >>
> > >> -------------------------------------------------------
> > >> This SF.net email is sponsored by: IBM Linux Tutorials.
> > >> Become an expert in LINUX or just sharpen your skills. Sign up for
> > >> IBM's
> > >> Free Linux Tutorials. Learn everything from the bash shell to sys
> > >> admin.
> > >> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> > >> _______________________________________________
> > >> Jython-users mailing list
> > >> Jyt...@li...
> > >> https://lists.sourceforge.net/lists/listinfo/jython-users
> > >>
> > >>
> > >>
> > >
> >
> >
> >
> > -- __--__--
> >
> > Message: 5
> > From: dd...@bi... (Dipankar Das)
> > To: <jyt...@li...>
> > Date: Mon, 29 Dec 2003 14:39:35 -0800
> > Subject: [Jython-users] How to make jython work with UTF-8
> >
> > We are migrating our server side java application into UTF-8.
> > All of our web pages and database data are configured to handle UTF-8.
> >
> > What are the necessary steps to configure jython to accept and return
> UTF-8
> > characters.
> > In one situation lower case umlaut (ü) returns me this '\xFC'.
> > In command line I test as "CMD>a = 'ü' CMD>a" and I find the value as
> > '\uFFFD'.
> >
> >
> > --Dipankar
> >
> >
> >
> >
> > -- __--__--
> >
> > _______________________________________________
> > Jython-users mailing list
> > Jyt...@li...
> > https://lists.sourceforge.net/lists/listinfo/jython-users
> >
> >
> > End of Jython-users Digest
> >
>
>
>
> --__--__--
>
> Message: 2
> From: <liu...@ho...>
> To: jyt...@li...
> Date: Thu, 01 Jan 2004 00:39:08 +0800
> Subject: [Jython-users] how to implement zope page template with java
>
> zope page template(zpt) is an excellent protocol for web designers.
> it stuck me at first glance,but java is my primary language,so java
> implemetion of zpt is required.
> when I start searching,only javazpt found(javazpt.sourceforge.net).
> it's developed too slow and under GPL. I prefer a stable one,...,more and
> more expected.
> ...but now,I had to start from jython,for zope is open-source,in public
> domain,and ZOPE3 is in CVS already. what i should do is using jython to
> stick zope's tal,tales,context module with java servlet.
> my question is: my jython version is 21,and zope3 like python2.3. if
jython
> import zope.pagetemplate.pagetemplate,error occurs.
> ----------------------------------------------------------
>
> >>> from zope.pagetemplate import pagetemplate as pt
> Traceback (innermost last):
> File "<console>", line 1, in ?
> File
"D:\Python23.3\Lib\site-packages\zope\pagetemplate\pagetemplate.py",
> line
> 23, in ?
> File "D:\Python23.3\Lib\site-packages\zope\tal\talparser.py", line 18,
in
> ?
> File "D:\Python23.3\Lib\site-packages\zope\tal\taldefs.py", line 19, in
?
> File "D:\Python23.3\Lib\site-packages\zope\tal\interfaces.py", line 16,
> in ?
> File "D:\Python23.3\Lib\site-packages\zope\interface\__init__.py", line
> 73, in
> ?
> File "D:\Python23.3\Lib\site-packages\zope\interface\interface.py", line
> 269
> yield interface
> ^
> SyntaxError: invalid syntax
>
> --------------------------------------------------------
>
> it seems that jython can't support python's new version,
> what can I do?
> Must I change the design from java--jython--python to java--C--python?
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
>
>
>
> --__--__--
>
> Message: 3
> From: <liu...@ho...>
> To: mj...@sr..., jyt...@li...
> Subject: RE: [Jython-users] How to add java class ............
> Date: Thu, 01 Jan 2004 00:59:55 +0800
>
>
>
>
> >From: "jai" <mj...@sr...>
> >To: <jyt...@li...>
> >Subject: [Jython-users] How to add java class ............
> >Date: Mon, 15 Dec 2003 15:20:54 +0530
> >
> >Hi
> > I have created a java class. using jython i imported that java
> class
> >in command prompt which works well.But if i try the same thing using the
> >python idle(GUI) it is not working for me,it simply throws module not
> found
> >error.
> >can u plse help me in this.
> >
> >waiting for ur reply.
> >regards
> >jai
> >
>
> Is there any jython GUI? I am afraid you are using CPython GUI.since
> CPython don't know java classes,import error occurs.
>
> I prefer the CPython IDLE provides us an entry to edit the command when
> pressing F5.
> but now,"python %1" is the default,and uneditable.
>
> _________________________________________________________________
> ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£ http://www.hotmail.com
>
>
>
>
> --__--__--
>
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>
> End of Jython-users Digest
>
|