[Jython-users] How to use the execute() method in javaos
by Hugh Rodgers other posts by this author
Feb 27 2002 4:57PM messages near this date
Re: [Jython-users] partial imports
|
Re: [Jython-users] How to use the execute() method in javaos
Hello -
I have been trying to use the javaos.execute() method for
some time now, unsuccessfully. I basically wanted to do the
following:
import os
os.execute( "f:\tests\HelloWorld" )
where HelloWorld is my compiled and working Java
application. I always get
AttributeError: class 'org.python.modules.os' has no
attribute 'execute'
I have researched this mailing lists archives for this bug
and have seen several posts. But I *have* confirmed that I
am finding javaos on my classpath (I added a print statement
in javaos.py and see it printed). I noticed that execute()
is a method within _ShellEnv class of javaos. So I guess I
do not have access to it? Am I then "forced" to implement
the execute() method in my own .py file? I confirmed that
other os function calls work. e.g., os.getcwd(), which are
in the __all__ of javaos. I have printed sys.path and see
the jython Lib directory in it.
I'm relatively new to Jython so any help/comments are
appreciated.
Hugh
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Hugh Rodgers
Oti
|