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. :-)


On Dec9, 2:28am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I think the problem is that it is running from the python.exe folder
> and not the web2py folder therefore it is not finding the libraries.
> As a test. try edit web2py.py and append the full web2py path to
> sys.path
>
> On Dec 8, 12:10 pm, Iceberg <iceb...@21cn.com> wrote:
>
>
>
> > I am using pythonce from 
> > here:http://sourceforge.net/projects/pythonce/files/
>
> > Mmm, firstly I deploy web2py in my SD card which has a default name in
> > non-ascii charactors, this seems to be the reason that web2py can not
> > even generate proper error trace. (The stack trace just flash and then
> > stop at a screen with NO meaningful file names inside.)
>
> > After moving web2py into the very root directory of my cellphone's
> > builtin memory, this time I see the error stack trace:
> >   File "\WEB2PY\WEB2PY.PY", line 16, in <module>
> >     import gluon.import_all
> >   <type 'exceptions.ImportError'>: No module named gluon.import_all
>
> > I am running web2py 1.72.3 source code distribution.
>
> > Later I tried using a copy of trunk-edition web2py, almost latest
> > trunk, and still encounter same problem.
>
> > On Dec 9, 2:31 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > it used to work on windowsCE. I have not tested it recently because I
> > > do not have windowsCE any more (I was so fed up with its bugs that I
> > > gave it away for free).
> > > Anyway, it should work unless some module is missing.
> > > Can you tell us more about the python version you are using and the
> > > stack trace?
>
> > > Massimo
>
> > > On Dec 8, 9:22 am, Iceberg <iceb...@21cn.com> wrote:
>
> > > > Just curious after I bought a Windows Mobile device recently. Google
> > > > search "web2py windows mobile" provides many articles saying web2py
> > > > can run on Windows Mobile system. However, same words can not be found
> > > > on officialhttp://www.web2py.com
>
> > > > I even try it by myself. But my cellphone, after installing a
> > > > PythonCE, can run a naive script with only "print 'hello world'"
> > > > inside, and can not run web2py.py, which results in an error trace
> > > > screen but no detail inside.
>
> > > > I am not going to write some serious web2py app on my mobile (yet).
> > > > Just curious to know whether web2py can run on windows mobile device.
> > > > Does anyone try that before?
>
> > > > Thanks in advance.
>
> > > > Sincerely,
> > > > Iceberg

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to