[PythonCE] Server socket + MessageBox hangs ?
Telion
telionce@yahoo.com
Fri, 29 Nov 2002 10:41:32 -0800 (PST)
--- Olivier Fambon <Olivier.Fambon@xrce.xerox.com> wrote:
> > Telion [Fri, 29 Nov 2002 08:58:19 -0800 (PST)] wrote:
> >
> >> If you are running "PythonCE2.2+ for HPC2000" on your iPaq (which is PPC),
> >> win32gui module may cause some problems.
> >
> > Ah ahhhh. Might be why then.
>
> Could it also be the cause for a bad listdir implem ?
I think it is the same for iPaq distribution.
These bugs in listdir will be fixed in the next release.
>
> On my iPaq, using listdir on an empty dir raises an exception instead
> of returning [].
>
> So I patched the [already patched] listdir with this:
>
> import os
>
> os.__listdir = os.listdir
>
> def __listdirfix(p):
> if p != '' : p = os.path.abspath(p)
> if p == "\\": p = ''
> if not os.stat(p)[0] & 0x4000: # stat raises Errno 18 [no file]
> raise os.error, "Not a dir: '%s'" % p
> try:
> return os.__listdir(p)
> except:
> return []
>
> os.listdir = __listdirfix
>
> _______________________________________________
> PythonCE mailing list
> PythonCE@python.org
> http://mail.python.org/mailman/listinfo/pythonce
=====
Telion
- telionce@yahoo.com -
http://pages.ccapcable.com/lac/PythonCE.html
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com