From: Kent J. <ke...@td...> - 2004-09-13 18:59:30
|
The Lib directory has to be in the Python path, not the Java classpath. I use the python.home variable to do this; set it to point to the directory containing the Lib directory. Alternatively you could point python.path directly at the Lib directory. Kent > > From: "R. Vince" <rvi...@ea...> > Date: 2004/09/13 Mon PM 02:28:16 EDT > To: <jyt...@li...> > Subject: [Jython-users] no module named pawt > > If I go to run, say the \Demo\swing\TreeDemo from the command line, it runs no problem. > > However, if I go into NetBeans, and try to run the same TreeDemo, when the code encounters > > from pawt import swing > > it returns with the error: > > " no module named pawt" > > I have tried various ways of adding the \Lib\pawt directory into my classpath in Netbeans. > > No luck -- I cannot seem to have pawt be seen when NetBeans invokes anything. Does anyone have any ideas I can try to get this to work from NetBeans? Thanks. > |
From: Jeff E. <JEm...@lg...> - 2004-09-13 20:04:39
|
import sys sys.path.append('the path to Lib goes here') import pawt -----Original Message----- From: jyt...@li... [mailto:jyt...@li...] On Behalf Of R. Vince Sent: Monday, September 13, 2004 1:19 PM To: Kent Johnson; jyt...@li... Subject: Re: [Jython-users] no module named pawt Can I do that from within the Jython code homehow? ----- Original Message -----=20 From: "Kent Johnson" <ke...@td...> To: <jyt...@li...> Sent: Monday, September 13, 2004 2:59 PM Subject: Re: [Jython-users] no module named pawt > The Lib directory has to be in the Python path, not the Java classpath. I use the python.ho me variable to do this; set it to point to the directory containing the Lib directory. Alternatively you could point python.path directly at the Lib directory. > > Kent > > > > > From: "R. Vince" <rvi...@ea...> > > Date: 2004/09/13 Mon PM 02:28:16 EDT > > To: <jyt...@li...> > > Subject: [Jython-users] no module named pawt > > > > If I go to run, say the \Demo\swing\TreeDemo from the command line, it runs no problem. > > > > However, if I go into NetBeans, and try to run the same TreeDemo, when the code encounters > > > > from pawt import swing > > > > it returns with the error: > > > > " no module named pawt" > > > > I have tried various ways of adding the \Lib\pawt directory into my classpath in Netbeans. > > > > No luck -- I cannot seem to have pawt be seen when NetBeans invokes anything. Does anyone have any ideas I can try to get this to work from NetBeans? Thanks. > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.=20 Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: R. V. <rvi...@ea...> - 2004-09-14 01:17:01
|
is there a means to test for the condition of , say 'C://jython/Lib' being in the sys.path? If I import pawt, per your instructions, it works perfectly. Except, if I subsequently run it, it appends 'C://jython/Lib' to the sys.path each time, ad infinitum. I's like to make the import of pawt be conditional, somehow, on whether or not it is allready in the sys path. Is there a means for testing such a thing? Thanks again! import sys sys.path.append('C://jython/Lib') import pawt from pawt import swing ----- Original Message ----- From: "Jeff Emanuel" <JEm...@lg...> To: "R. Vince" <rvi...@ea...> Cc: <jyt...@li...> Sent: Monday, September 13, 2004 4:04 PM Subject: RE: [Jython-users] no module named pawt import sys sys.path.append('the path to Lib goes here') import pawt -----Original Message----- From: jyt...@li... [mailto:jyt...@li...] On Behalf Of R. Vince Sent: Monday, September 13, 2004 1:19 PM To: Kent Johnson; jyt...@li... Subject: Re: [Jython-users] no module named pawt Can I do that from within the Jython code homehow? ----- Original Message ----- From: "Kent Johnson" <ke...@td...> To: <jyt...@li...> Sent: Monday, September 13, 2004 2:59 PM Subject: Re: [Jython-users] no module named pawt > The Lib directory has to be in the Python path, not the Java classpath. I use the python.ho me variable to do this; set it to point to the directory containing the Lib directory. Alternatively you could point python.path directly at the Lib directory. > > Kent > > > > > From: "R. Vince" <rvi...@ea...> > > Date: 2004/09/13 Mon PM 02:28:16 EDT > > To: <jyt...@li...> > > Subject: [Jython-users] no module named pawt > > > > If I go to run, say the \Demo\swing\TreeDemo from the command line, it runs no problem. > > > > However, if I go into NetBeans, and try to run the same TreeDemo, when the code encounters > > > > from pawt import swing > > > > it returns with the error: > > > > " no module named pawt" > > > > I have tried various ways of adding the \Lib\pawt directory into my classpath in Netbeans. > > > > No luck -- I cannot seem to have pawt be seen when NetBeans invokes anything. Does anyone have any ideas I can try to get this to work from NetBeans? Thanks. > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Geoff G. <ge...@ge...> - 2004-09-14 02:38:21
|
Quoting R. Vince (rvi...@ea...): > is there a means to test for the condition of , say 'C://jython/Lib' being > in the sys.path? Try using: import sys if "c://jython/Lib" not in sys.path: sys.path.append("c://jython/Lib") import pawt |
From: R. V. <rvi...@ea...> - 2004-09-13 19:19:24
|
Can I do that from within the Jython code homehow? ----- Original Message ----- From: "Kent Johnson" <ke...@td...> To: <jyt...@li...> Sent: Monday, September 13, 2004 2:59 PM Subject: Re: [Jython-users] no module named pawt > The Lib directory has to be in the Python path, not the Java classpath. I use the python.ho me variable to do this; set it to point to the directory containing the Lib directory. Alternatively you could point python.path directly at the Lib directory. > > Kent > > > > > From: "R. Vince" <rvi...@ea...> > > Date: 2004/09/13 Mon PM 02:28:16 EDT > > To: <jyt...@li...> > > Subject: [Jython-users] no module named pawt > > > > If I go to run, say the \Demo\swing\TreeDemo from the command line, it runs no problem. > > > > However, if I go into NetBeans, and try to run the same TreeDemo, when the code encounters > > > > from pawt import swing > > > > it returns with the error: > > > > " no module named pawt" > > > > I have tried various ways of adding the \Lib\pawt directory into my classpath in Netbeans. > > > > No luck -- I cannot seem to have pawt be seen when NetBeans invokes anything. Does anyone have any ideas I can try to get this to work from NetBeans? Thanks. > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |