mmrsohn / jythonroid

Automatically exported from code.google.com/p/jythonroid
0 stars 0 forks source link

initialize sys module problem #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.copy the fold Lib and caches into android:/data/data/org.python.util/ 
2. modify the PySystemState.java in 301, force the parament 'root' to be
"/data/data/org.python.util"
3. copy the .class files into the Jythonroid.apk, then install it.
4.run dalvikvm -classpath /data/app/Jythonroid.apk org.python.util.jython

What is the expected output? What do you see instead?
expected to run successfully, but instead throws Exception like bellow:

error importing site
Traceback (innermost last):
  File "/data/data/org.python.util/Lib/site.py", line 68, in ?
AttributeError: module 'sys' has no attribute 'modules'

Please use labels and text to provide additional information.

It seem like that the Jythonroid will use the .class files and, and then
initialize the sys module there.

so i decide to make two branches of my code, one is Jythonroid-server, the
Other is Jythonroid-client.
the Jythonroid-server will be compiled into a jar file ,and then install in
/data/data/org.python.util, and the fold contains py files (Lib) will move
here too.
the Jythonroid-client will be a Android project, and will have the code
org/python/util/Jythonroid.java

Original issue reported on code.google.com by juanzhew...@gmail.com on 16 Apr 2008 at 4:25