From: Adam K. <ak...@ma...> - 2002-02-17 22:59:39
|
I struggled with the same issue this week. The stuff in the FAQ documentation didn't work the first time I did it. Anyway, I played = with a bit to get it to work. My Lib directory (where the modules are) are in ./Lib in this example. If this doesn't work, you can always = uncommment out the last 2 lines, which is another way of doing the same thing. PythonInterpreter interpreter =3D new PythonInterpreter(); String libDir=3D"."+File.separator+"Lib"; Properties props =3D new Properties(); props.setProperty("sys.path", libDir); PythonInterpreter.initialize(System.getProperties(), props,=20 new String[] {""}); // interpreter.exec("import sys"); // interpreter.exec("sys.path.append('.\\Lib')"); -----Original Message----- From: jyt...@li... [mailto:jyt...@li...] Sent: Sunday, February 17, 2002 3:11 PM To: jyt...@li... Subject: Jython-users digest, Vol 1 #405 - 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. import error (Branko Strok) 2. =C7=F6=C0=E7 =C0=AF=B7=E1=B0=D4=BD=C3=C6=C7=C0=BB = =B0=F8=B0=B3=C7=CF=B0=ED =C0=D6=BD=C0=B4=CF=B4=D9. =B5=B7=B5=C7=B4=C2 = =C1=F5=B1=C7=C1=A4=BA=B8=B0=A1 =B0=A1=B5=E6=C7=D5=B4=CF=B4=D9 (=B9=DA=BD=C2=C8=C6) 3. Re: import error (Ype Kingma) 4. RE:Import Error (Branko Strok) 5. RE:Import Error (Ype Kingma) --__--__-- Message: 1 From: "Branko Strok" <drb...@ho...> To: jyt...@li... Date: Sun, 17 Feb 2002 05:19:06 +0100 Subject: [Jython-users] import error > >Hello, > I just recently discovered jython and it seems like dream come true! But I got stuck at the very beginning! Could anyone please help me with this, I can send send code examples if necessary: > Q1: I have a python application that I got from the web (I don't=20 understandmuch of the python code). It is comprised of many .py files = which=20 all reside in one directory. If I call the main .py script by invoking=20 standard python windows interpreter in the same command prompt line=20 everything works fine. But...when I want to call main script from my java code like: interp.execfile(myscript.py)I get all import error messages: cannot = import=20 module, name etc. Is the solution related to the python.home parameter? How do I fix = this? > Q2: I have to send parameters to the main python script on invocation. = Can I do that from interp.execfile(myscript.py -param a)? Is there any other = way=20 to do this? > Thanks in advance. Jython is like gift from Gods solution for my problems...well only if I make it work. > >Branko _________________________________________________________________ Get your FREE download of MSN Explorer at = http://explorer.msn.com/intl.asp. --__--__-- Message: 2 Reply-To: us...@ko... From: =B9=DA=BD=C2=C8=C6 <kei...@ya...> To: <jyt...@li...> Date: Sun, 17 Feb 2002 17:45:46 +0900 Subject: [Jython-users] =C7=F6=C0=E7 = =C0=AF=B7=E1=B0=D4=BD=C3=C6=C7=C0=BB =B0=F8=B0=B3=C7=CF=B0=ED = =C0=D6=BD=C0=B4=CF=B4=D9. =B5=B7=B5=C7=B4=C2 =C1=F5=B1=C7=C1=A4=BA=B8=B0=A1 =B0=A1=B5=E6=C7=D5=B4=CF=B4=D9 <HTML> <HEAD> <META content=3D"text/html; charset=3Dks_c_5601-1987" = http-equiv=3DContent-Type> <STYLE> p, font, span { line-height:120%; margin-top:0; = margin-bottom:0; }</STYLE> </HEAD><BODY> <TABLE borderColor=3D#999999 cellSpacing=3D0 borderColorDark=3Dwhite = width=3D650=20 align=3Dcenter borderColorLight=3D#999999 border=3D1> =20 <TR> <TD width=3D644> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2><IMG = height=3D79 alt=3D11.bmp=20 src=3D"http://www.94stock.com/top.gif" width=3D648=20 border=3D0></FONT></SPAN></P></TD></TR> <TR> <TD width=3D644> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><FONT = face=3D=B5=B8=BF=F2> <IMG=20 height=3D68 src=3D"http://www.94stock.com/mid.gif" width=3D421=20 border=3D0></FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><A href=3D"http://www.94stock.com"=20 target=3D_blank><FONT face=3D=B5=B8=BF=F2 color=3D#666666><IMG = height=3D53=20 src=3D"http://www.94stock.com/join.gif" width=3D189=20 border=3D0></FONT></A></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dleft><IMG height=3D30 = src=3D"http://www.94stock.com/open.gif" width=3D305=20 border=3D0></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dleft> </P> <P=20 style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"> <FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt">=C7=F6=C0=E7 =C0=AF=B7=E1=B0=D4=BD=C3=C6=C7=C0=BB =C0=E1=BD=C3=B5=BF=BE=C8 =BF=C0=C7=C2=C7=CF=B0=ED=20 =C0=D6=BD=C0=B4=CF=B4=D9. =B5=B7=C0=CC=B5=C7=B4=C2 = =C1=B7=C1=FD=B0=D4 =C1=BE=B8=F1=C3=DF=C3=B5 = =B0=D4=BD=C3=C6=C7=C0=B8=B7=CE =B0=A1=BC=C5=BC=AD </SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> 94=BD=BA=C5=B9 =C1=BE=B8=F1=C3=DF=C3=B5=BF=A1 =B4=EB=C7=D1=20 =B3=EB=C7=CF=BF=EC=B8=A6 =C1=F7=C1=A2 =C8=AE=C0=CE=C7=D8 = =BA=B8=BD=C3=B1=E2 =B9=D9=B6=F8=B4=CF=B4=D9. =B1=CD=C7=CF=B2=B2 =C5=AB = =B5=B5=BF=F2=C0=CC =B5=C7=B8=AE=B6=F3 =C0=DA=BA=CE=C7=D5=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: 9pt"> </SPAN><SPAN=20 style=3D"FONT-SIZE: 12pt"><B>=BE=C6=C0=CC=B5=F0</B></SPAN><SPAN = style=3D"FONT-SIZE: 9pt"> :=20 </SPAN></FONT>b8848<FONT face=3D=B5=B8=BF=F2 = color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"> </SPAN><SPAN=20 style=3D"FONT-SIZE: = 12pt"><B>=BA=F1=B9=D0=B9=F8=C8=A3</B></SPAN><SPAN style=3D"FONT-SIZE: 9pt"> :=20 </SPAN></FONT>b8887</P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2><SPAN style=3D"FONT-SIZE: = 9pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2><IMG = height=3D30 alt=3D33.bmp=20 src=3D"http://www.94stock.com/market.gif" width=3D305=20 border=3D0></FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT = face=3D=B5=B8=BF=F2></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =C0=CC=C1=A6 =B0=E6=B1=E2=B0=A1 =B9=D9=B4=DA=C0=BB =C4=A1=B0=ED =BC=AD=BC=AD=C8=F7=20 =C1=A4=BB=F3=C0=BB =C7=E2=C7=D8 =B1=E2=C1=F6=B0=B3=B8=A6 = =C5=B0=B0=ED =C0=D6=BD=C0=B4=CF=B4=D9. = =C1=F5=B1=C7=B0=E8=BF=A1=BC=AD=B4=C2 = =B4=EB=B9=DA=C0=E5=C0=B8=B7=CE=C0=C7 =C1=F8=C0=D4=C0=CC</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =BE=F3=B8=B6=B3=B2=C1=F6 =BE=CA=C0=BA=20 =BD=C3=B1=E2=C0=D4=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: 9pt"> =C1=D6=BD=C4=BD=C3=C0=E5=BF=A1=BC=AD =C7=F6=C0=E7=C0=C7 = =C0=E5=BC=BC=B4=C2 =BE=C6=C1=D6=20 =C1=DF=BF=E4=C7=D5=B4=CF=B4=D9. =BE=D5=C0=B8=B7=CE = =B4=D9=B0=A1=BF=C3 =B4=EB=B9=DA=C0=E5=BF=A1=BC=AD =B4=A9=B0=A1 = =B8=D5=C0=FA =C8=B2=B1=DD=C1=D6=B8=A6 =BC=B1=C1=A1=C7=CF=B4=C0=B3=C4 =C7=CF=B4=C2 </SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =B1=E6=B8=F1=C0=CC=B6=F3=B0=ED =C7=D2 =BC=F6 =C0=D6=B1=E2=20 =B6=A7=B9=AE=C0=D4=B4=CF=B4=D9. </SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =B1=D7=B7=B1 =C0=C7=B9=CC=BF=A1=BC=AD =C1=F6=B1=DD=C0=CC =C1=D6=BD=C4=20 =C5=F5=C0=DA=B8=A6 =C7=CF=B1=E2=BF=A1 =C0=FB=B1=E2=B6=F3=B0=ED = =C7=D2 =BC=F6 =C0=D6=BD=C0=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =C7=CF=B7=E7=B6=F3=B5=B5 =BB=A1=B8=AE =C5=F5=C0=DA=B1=E2=C1=D8=C0=BB=20 =B8=B6=B7=C3=C7=CF=BF=A9 =B4=EB=BA=F1=B8=A6 = =C7=D8=BE=DF=C7=D5=B4=CF=B4=D9. =C0=CC=BF=A1 =C0=FA=C8=F1 = 94=BD=BA=C5=B9=BF=A1=BC=AD=B4=C2 =BF=A9=B7=AF=BA=D0=B5=E9=C0=BB = =C0=A7=C7=D8 =C8=AE=BD=C7=C7=D1 </SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =B3=EB=C7=CF=BF=EC=B8=A6 =C1=D8=BA=F1 =C7=D8=B5=CE=B0=ED=20 =C0=D6=BD=C0=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> =B4=D9=B8=A5 =BB=E7=C0=CC=C6=AE=BF=CD=B4=C2 =C2=F7=BA=B0=C8=AD=B5=C7=B4=C2=20 =C7=C7=BA=CE=BF=A1 =BF=CD=B4=EA=B4=C2 = =C5=F5=C0=DA=B3=EB=C7=CF=BF=EC=C0=D4=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666><IMG height=3D30=20 alt=3D33.bmp src=3D"http://www.94stock.com/94.gif" width=3D305=20 border=3D0></FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =C0=FA=C8=F1 94=BD=BA=C5=B9=C0=BA =C1=D6=BD=C4=C5=F5=C0=DA=B0=A1=B5=E9=C0=BB=20 =C0=A7=C7=D8 =B0=A2=C1=BE =C1=A4=BA=B8=B8=A6 = =C1=A6=B0=F8=C7=CF=B4=C2 =C8=B8=BF=F8=C1=A6 = =C1=F5=B1=C7=C4=C1=BC=B3=C6=C3 =BB=E7=C0=CC=C6=AE=C0=D4=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =B4=EB=C7=FC =C1=F5=B1=C7=C6=F7=C5=BB =BB=E7=C0=CC=C6=AE=B8=A6 = =C7=A5=B9=E6=C7=CF=C1=F6=20 =BE=CA=BD=C0=B4=CF=B4=D9. =BC=D2=BC=F6=C0=C7 = =C8=B8=BF=F8=B5=E9=B0=FA =B9=D0=B5=B5=C0=D6=B0=D4 = =C4=BF=B9=C2=B4=CF=C4=C9=C0=CC=BC=C7=C7=CF=B4=C2 =B0=CD=C0=BB =C3=DF=B1=B8=C7=D5=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =C5=F5=C0=DA=C1=BE=B8=F1 =B8=EE =B0=B3 =B4=F8=C1=AE=C1=D6=B0=ED =B3=A1=C0=CE=20 =B1=D7=B7=B1 =BB=E7=C0=CC=C6=AE=B5=E9=B0=FA=B4=C2 =C6=B2=B8=B0 = =B1=B8=C3=BC=C0=FB=C0=CE =C1=A4=BA=B8=B8=A6 =C8=B8=BF=F8=B5=E9=B2=B2 = =C1=D6=B7=C1 =B3=EB=B7=C2=C7=D5=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =BE=C8=C1=A4=C0=FB=C0=CE =BC=F6=C0=CD=C0=CC=BE=DF=B8=BB=B7=CE=20 =C5=F5=C0=DA=C4=C1=BC=B3=C6=C3=BF=A1 =C0=D6=BE=EE=BC=AD = =B1=E2=BA=BB=C0=D4=B4=CF=B4=D9. =C0=CC=B0=CD=C0=BB 94=BD=BA=C5=B9=C0=BA = =B1=CD=C7=CF=B2=B2 =BD=C7=C7=F6=BD=C3=C4=D1=B5=E5=B8=B3=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666><IMG height=3D30=20 src=3D"http://www.94stock.com/tuja.gif" width=3D305=20 border=3D0></FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> 94=BD=BA=C5=B9=B8=B8=C0=C7 =B3=EB=C7=CF=BF=EC=B7=CE =B8=B8=B5=E9=BE=EE=C1=F8=20 =C5=F5=C0=DA=BA=F1=B9=FD=C0=D4=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =C1=A4=BD=C5=BE=F8=C0=CC =BC=FB=B0=A1=BB=DA=B0=D4 =BA=AF=C8=AD=C7=CF=B4=C2 =C0=E5=BC=BC=20 =BC=D3=BF=A1=BC=AD =C0=DA=BD=C5=B8=B8=C0=C7 =C5=F5=C0=DA = =B3=EB=C7=CF=BF=EC=B8=A6 =BD=D7=B1=E2=B4=C2 =B8=C5=BF=EC =C8=FB=C0=CC =B5=EC=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =C0=DA=BD=C5=B8=B8=C0=C7 =B1=E2=B9=FD=C0=BB =C3=A3=BE=D2=B4=D9=C7=CF=B4=F5=B6=F3=B5=B5=20 =BE=F6=C3=BB=B3=AD =BC=D5=BD=C7=C0=C7 = =B4=EB=B0=A1=C0=CC=B0=C5=B3=AA =BF=EE=C1=C1=B0=D4=B5=B5 =C5=AB = =BC=D5=BD=C7=C0=BA =B8=F0=B8=E9=C7=DF=B4=D9=C7=CF=B4=F5=B6=F3=B5=B5 = =BD=C7=B7=CE =B8=B9=C0=BA </FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 color=3D#666666> =BD=C3=B0=A3=B0=FA =C1=A4=B7=C2=C0=BB=20 =BD=F1=BE=C6=BA=CE=BE=FA=C0=BB = =B0=CD=C0=D4=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> 94=BD=BA=C5=B9=C0=BA =C0=CC=B7=AF=C7=D1 =BC=D5=BD=C7=B0=FA =B3=EB=B7=C2=C0=BB=20 =C3=D6=BC=D2=C8=AD=C7=D2 =BC=F6 =C0=D6=B4=C2 =B9=E6=B9=FD=C0=BB = =C1=A6=BD=C3=C7=D5=B4=CF=B4=D9. =B9=D9=B7=CE 94 =BD=C7=C0=FC=C5=F5=C0=DA=B1=E2=B9=FD=C0=D4=B4=CF=B4=D9.</FONT></SPAN></P= > <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666> </FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666><IMG height=3D30=20 alt=3D33.bmp src=3D"http://www.94stock.com/sub.gif" width=3D305=20 border=3D0></FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN style=3D"FONT-SIZE: = 9pt"> 94=BD=BA=C5=B9=BF=A1=BC=AD =C8=B8=BF=F8=C1=A6=B7=CE =B9=D0=B5=B5=C0=D6=B4=C2=20 =C1=BE=B8=F1=C3=DF=C3=B5=C0=BB =C7=CF=B0=ED = =C0=D6=BD=C0=B4=CF=B4=D9. =B9=D9=B7=CE =C1=B7=C1=FD=B0=D4 =C1=BE=B8=F1=C3=DF=C3=B5=C0=D4=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =C7=CF=B7=E7 =C0=FC=B3=AF =BD=C9=B5=B5=C0=D6=B4=C2 =BA=D0=BC=AE=C0=B8=B7=CE=20 =C0=AF=B8=C1 =C5=F5=C0=DA =C1=BE=B8=F1=C0=BB = =C1=FD=BE=EE=B5=E5=B8=B3=B4=CF=B4=D9. =B0=A2=C1=BE =C2=F7=C6=AE=BF=CD = =C7=D4=B2=B2 =C3=DF=BC=BC=BA=D0=BC=AE =B5=EE=B5=EE =B4=D9=BE=E7=C7=D1 =B1=E2=B9=FD=C0=CC </FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =B5=BF=BF=F8=B5=CB=B4=CF=B4=D9. =C8=B8=BF=F8=B5=E9=B2=B2 =C3=D6=B4=EB=C7=D1=20 =BE=C8=C1=A4=C0=FB=C0=CE =BC=F6=C0=CD=B7=FC=C0=BB = =BE=C8=B0=DC=B5=E5=B8=B3=B4=CF=B4=D9. =B5=E7=B5=E7=C7=D1 = =C5=F5=C0=DA=B1=E2=C1=D8=C0=BB =C1=A6=BD=C3=C7=D8 =C1=D6=B8=AE=B6=F3 =B9=CF=BD=C0=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2 color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666> =B4=F5=BF=ED =C0=DA=BC=BC=C7=D1 =BB=E7=C7=D7=C0=BA 94=BD=BA=C5=B9=20 =BB=E7=C0=CC=C6=AE=B7=CE =BF=C0=BC=C5=BC=AD = =C8=AE=C0=CE=C7=CF=BD=C3=B1=E2 =B9=D9=B6=F8=B4=CF=B4=D9. =C0=CC = =BF=DC=BF=A1=B5=B5 =B4=D9=BE=E7=C7=D1 =C1=A4=BA=B8=B5=E9=C0=CC =C0=D6=BD=C0=B4=CF=B4=D9.</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><FONT = face=3D=B5=B8=BF=F2=20 color=3D#666666> </FONT></SPAN><FONT face=3D=B5=B8=BF=F2 = color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 12pt"><B>=BE=C6=C0=CC=B5=F0</B></SPAN><SPAN = style=3D"FONT-SIZE: 9pt"> :=20 </SPAN></FONT>b8848<FONT face=3D=B5=B8=BF=F2 = color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 9pt"> </SPAN><SPAN=20 style=3D"FONT-SIZE: = 12pt"><B>=BA=F1=B9=D0=B9=F8=C8=A3</B></SPAN><SPAN style=3D"FONT-SIZE: 9pt"> :=20 </SPAN></FONT>b8887</P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><A href=3D"http://www.94stock.com"=20 target=3D_blank><FONT face=3D=B5=B8=BF=F2 color=3D#666666><IMG = height=3D53=20 src=3D"http://www.94stock.com/join.gif" width=3D189=20 border=3D0></FONT></A></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2=20 color=3D#666666></FONT></SPAN> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><FONT = face=3D=B5=B8=BF=F2=20 color=3D#666666> =C1=F6=B1=DD=B1=EE=C1=F6 =C0=CC = =B8=DE=C0=CF=C0=BB =C0=D0=BE=EE=C1=D6=BD=C5 =B1=CD=C7=CF=B2=B2 = =B0=A8=BB=E7=C0=C7 =B8=BB=BE=B8=B5=E5=B8=B3=B4=CF=B4=D9. =C7=D7=BB=F3 = =B0=C7=BD=C2=C7=CF=BD=C3=B1=E6=20 =B9=D9=B6=F8=B4=CF=B4=D9.</FONT></SPAN></P> <P=20 style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><FONT face=3D=B5=B8=BF=F2 color=3D#666666><SPAN = style=3D"FONT-SIZE: 8pt">=B1=CD=C7=CF=B2=B2=20 =B4=D9=BD=C3=B4=C2 =B8=DE=C0=CF=B9=DF=BC=DB=C0=CC =BE=F8=C0=BB = =B0=CD=C0=CC=BF=C0=B3=AA =BC=F6=BD=C5=B0=C5=BA=CE=B8=A6 = =BF=F8=C7=CF=BD=C5=B4=D9=B8=E9 =BE=C6=B7=A1=B8=A6 =C5=AC=B8=AF=C7=CF=BC=BC=BF=E4!</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><FONT face=3D=B5=B8=BF=F2 color=3D#666666><SPAN=20 style=3D"FONT-SIZE: 8pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 120%"=20 align=3Dcenter><A href=3D"mailto:us...@ko...?subject=3D=BC=F6=BD=C5=B0=C5=BA=CE=C7=D5= =B4=CF=B4=D9."><SPAN=20 style=3D"FONT-SIZE: 9pt"><FONT face=3D=B5=B8=BF=F2 = color=3D#666666><IMG height=3D21=20 src=3D"http://www.94stock.com/nowant.gif" width=3D85=20 border=3D0></FONT></SPAN></A></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 120%"><FONT=20 face=3D=B5=B8=BF=F2><SPAN style=3D"FONT-SIZE: 9pt"></SPAN></FONT> </P></TD></TR> <TR> <TD width=3D644 background=3Dhttp://www.94stock.com/line.bmp> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 80%"=20 align=3Dcenter><FONT face=3D=B5=B8=BF=F2><SPAN = style=3D"FONT-SIZE: 8pt"> =B4=D9=BD=C3=C7=D1=B9=F8 = =B8=BB=BE=B8=B5=E5=B8=B3=B4=CF=B4=D9.=20 =C0=CC =B8=DE=C0=CF=C0=BA =C3=B3=C0=BD=C0=CC=C0=DA = =B8=B6=C1=F6=B8=B7 =B8=DE=C0=CF=C0=D4=B4=CF=B4=D9. =C0=CC =C1=A1 = =C0=CC=C7=D8 =BA=CE=C5=B9=B5=E5=B8=B3=B4=CF=B4=D9.</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 80%"=20 align=3Dcenter><FONT face=3D=B5=B8=BF=F2><SPAN = style=3D"FONT-SIZE: 8pt"> =C7=D7=BB=F3 =C7=E0=BA=B9 =B0=A1=B5=E6=C7=D1=20 =BB=FD=C8=B0=B5=C7=BD=C3=B1=E6 = =B9=D9=B6=F8=B4=CF=B4=D9!</SPAN></FONT></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 80%"=20 align=3Dcenter><FONT face=3D=B5=B8=BF=F2><SPAN=20 style=3D"FONT-SIZE: 8pt"></SPAN></FONT> </P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 80%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 9pt"><FONT=20 face=3D"Lucida Console">Copyright =A8=CF 2001 </FONT><FONT = face=3D"Lucida Console"=20 color=3D#ff9933>94stock</FONT><FONT face=3D"Lucida Console"> All = Rights=20 Reserved</FONT></SPAN></P> <P style=3D"MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: = 80%"=20 align=3Dcenter><SPAN style=3D"FONT-SIZE: 8pt"><FONT=20 face=3D=B5=B8=BF=F2></FONT></SPAN> </P></TD></TR></TABLE> <P> </P> </BODY> </HTML> --__--__-- Message: 3 Date: Sun, 17 Feb 2002 11:50:12 +0100 To: jyt...@li... From: Ype Kingma <yk...@xs...> Subject: Re: [Jython-users] import error Branko, >>Hello, >> >I just recently discovered jython and it seems like dream come true! :) >But I got stuck at the very beginning! Could anyone please help me = with >this, I can send send code examples if necessary: >> >Q1: I have a python application that I got from the web (I don't understandmuch of the python code). It is comprised of many .py files = which all reside in one directory. If I call the main .py script by invoking standard python windows interpreter in the same command prompt line everything works fine. >But...when I want to call main script from my java code like: >interp.execfile(myscript.py)I get all import error messages: cannot = import module, name etc. >Is the solution related to the python.home parameter? How do I fix = this? The standard interpreter puts the current directory in sys.path when it starts a script from the shell command line. You'll have to do this yourself when you use interp.execfile('myscript.py'). (sys.path contains the directories from which modules can be imported.) >> >Q2: I have to send parameters to the main python script on invocation. = Can I do that from interp.execfile(myscript.py -param a)? Is there any = other way to do this? The standard interpreter takes the args from the shell command line and puts them in sys.argv. Again, you'll have prepare sys.argv = yourself. You might also pass a namespace (ie. a dictionary) execfile() with '__name__' set to '__main__'. Any other var/value combination can be used to pass things on. You can do all of this in python code or java code. >Thanks in advance. Jython is like gift from Gods solution for my >problems...well only if I make it work. My pleasure. You will. Have fun, Ype --=20 --__--__-- Message: 4 From: "Branko Strok" <drb...@ho...> To: jyt...@li... Date: Sun, 17 Feb 2002 19:44:34 +0100 Subject: [Jython-users] RE:Import Error Thanks Ype, Now when I know what to do I still can't pull it off...maybe I = overlooked something since I want to get this "baby" started ASAP: Q1: How do I set sys.path in my java code? The solution posted on FAQ pages doesn't seem to work: Properties props =3D new Properties(); props.setProperty("python.path", "path to my modules"); PythonInterpreter.initialize(System.getProperties(), props, new String[] {""}); Q2: How do I populate/set sys.argv for myapp.py in my java code? Sorry for the newbie questions...I really appreciate your time taken to = answer this. Sincerely, Branko _________________________________________________________________ Join the world's largest e-mail service with MSN Hotmail.=20 http://www.hotmail.com --__--__-- Message: 5 Date: Sun, 17 Feb 2002 20:43:25 +0100 To: jyt...@li... From: Ype Kingma <yk...@xs...> Subject: [Jython-users] RE:Import Error Branko, >Thanks Ype, > >Now when I know what to do I still can't pull it off...maybe I = overlooked >something since I want to get this "baby" started ASAP: > >Q1: How do I set sys.path in my java code? >The solution posted on FAQ pages doesn't seem to work: > >Properties props =3D new Properties(); > props.setProperty("python.path", "path to my modules"); > PythonInterpreter.initialize(System.getProperties(), props, > new String[] {""}); >Q2: How do I populate/set sys.argv for myapp.py in my java code? Inserting '.' in front of sys.path from java: interpr.exec("sys.path[0:0] =3D ['.']"); Removing it afterwards: interpr.exec("del sys.path[0]"); Basically write the wrapping code statements in jython have your interpr execute these one by one. Similar for sys.argv. In case you want to make sure sys.path is the same afterwards use try/finally in java: interpr.exec("sys.path[0:0] =3D ['.']"); try { interpr.exec('yourcode.py'); } finally { interpr.exec("del sys.path[0]"); } >Sorry for the newbie questions...I really appreciate your time taken = to answer this. It's not newbie stuff, but it keeps popping up. Embedding jython seems to be popular these days. Regards, Ype --=20 --__--__-- _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users End of Jython-users Digest |