ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-dev
Jython-dev
Re: [Jython-dev] jythinc called from java code
by Michal Sankot other posts by this author
Oct 21 2003 3:47PM messages near this date
RE: [Jython-dev] jythinc called from java code | RE: [Jython-dev] jythinc called from java code
hmm, how do I set working directory ? I tried following:
-----------------------------
        Properties postProp = new Properties();
        postProp.setProperty("python.home","d:\\jython");

        PythonInterpreter.initialize(System.getProperties(),postProp,null);
        PythonInterpreter pi = new PythonInterpreter();
        pi.execfile("D:\\jython\\Tools\\jythonc\\jythonc.py");
-----------------------------
and I get error message:

Traceback (innermost last):
  File "D:\jython\Tools\jythonc\jythonc.py", line 4, in ?
ImportError: no module named main
Exception in thread "main"

This seems, that it can't find other modules in the same directory, and thus
that it would need to have it somehow indicated (through properties I'd
say).
Is there such property ?

Michal


----- Original Message ----- 
> 
>  No, I think you wouldn't be able to run the generated code
>  without the jython code.
> 
>  Jythonc is a jython .py file.  You could invoke it with
>  your embedded PythonInterpreter.  See Tools/main.py.




-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Jython-dev mailing list
Jython-dev@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-dev
Thread:
Jeff Emanuel
Michal Sankot

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved