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-users
Jython-users
[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

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