Feedback: made little progress, but no victory so far.
1. The import gluon.import_all error I mentioned in my previous post,
is not relevant to sys.path, but about case-sensitivity. When I attach
my cellphone to my PC in a "usb-disk" mode and manually copy web2py/*
into it, all directorys and files with a name shorter than 8.3 format
result in UPPER CASE. No wonder fail to import gluon codes when it is
actually GLUON/__INIT__.PY. The workaround is relative simple albeit
not always convenient: do not copy and paste web2py/* directly, but
setup MS ActiveSync to "sync" them into the cellphone, this way the
file names remain in lower case somehow.
2. Then the other issue is about subprocess.py. It contains:
import sys
mswindows = (sys.platform == "win32")
...
if mswindows:
import msvcrt
But in PythonCE running on WinCE, there is no msvcrt lib. Perhaps the
official subprocess.py should use:
mswindows = (
os.name == "nt")
to exclude Windows Mobile, which
os.name == 'ce'.
Thinking I'd better not touch the official subprocess.py, I tried to
adjust contrib/cron.py:
try: from subprocess import Popen,PIPE
except: logging.exception('Ignore, do not need it anyway')
and I also change last line of web2py.py into:
sys.argv.extend(['-a1','-N'])
gluon.widget.start(cron=
os.name!='ce')
3. However, web2py still breaks somewhere during starting up, the
break point seems to be in bind() of gluon/wsgiserver.py:
prevent_socket_inheritance(self.socket)
Don't know what to do, so I just stop here. Maybe all these info are
useful to someone who really need a web2py on windows mobile. :-)