Title: sys.executable not defined
Type: Severity: normal
Components: Core Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn
Priority: low Keywords:

Created on 2000-11-18.19:21:08 by bckfnn, last changed 2000-11-18.22:46:32 by bckfnn.

msg105 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.19:21:08
The sys.executable is not defined for jpython:

JPython 1.1beta4 on java1.3beta (JIT: null)
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> import sys
>>> sys.executable
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: module 'sys' has no attribute 'executable'

The documentation says:

     A string giving the name of the executable binary for the Python
     interpreter, on systems where this makes sense. "

I can not check what sys.executable is on a system where this does not
make sense, but from an existing python program (pysol), I guess it is
set to None. If this is the case, then I think it should also be None
for JPython. If my assumtion about sys.executable is wrong, this PR is
best ignored.

*** \java\JPython-1.1beta4\org\python\core\   Fri
Oct 29 18:36:12 1999
---  Sat Dec 18 11:29:52 1999
*** 57,62 ****
--- 57,64 ----
      public static int maxint = Integer.MAX_VALUE;
      public static int minint = Integer.MIN_VALUE;

+     public PyObject executable = Py.None;
      private ClassLoader classLoader = null;
      public ClassLoader getClassLoader() {
          return classLoader;
msg106 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.22:46:32
Fixed by setting sys.executable to None.
Date User Action Args
2000-11-18 19:21:08bckfnncreate