From brian@ablelinktech.com Sat Nov 2 03:22:19 2002 From: brian@ablelinktech.com (Brian Brown) Date: Fri, 1 Nov 2002 20:22:19 -0700 Subject: [PythonCE] XScale Message-ID: <4B8B0274-EE12-11D6-A294-003065F89450@ablelinktech.com> Greetings! Has anyone tried to run PythonCE on the intel Xscale processors? I am going to try it, but was wondering if I would have to try to recompile or if the StrongARM version would run... Brian From ppcquicksoft@iespana.es Sat Nov 2 07:32:38 2002 From: ppcquicksoft@iespana.es (Javier) Date: Sat, 02 Nov 2002 08:32:38 +0100 Subject: [PythonCE] XScale In-Reply-To: <4B8B0274-EE12-11D6-A294-003065F89450@ablelinktech.com> Message-ID: <5.1.0.14.0.20021102083113.04ae88e8@pop.iespana.es> XScale processor is binary compatible to ARM. So any program compiled for=20 ARM architecture will run under XScale. In any case, please sen your feeback to the list after a few runs so we can= =20 all share your experience. Cheers Javier At 20:22 01/11/2002 -0700, Brian Brown wrote: >Greetings! > > Has anyone tried to run PythonCE on the intel Xscale processors? I am=20 > going to try it, but was wondering if I would have to try to recompile or= =20 > if the StrongARM version would run... > >Brian > > >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce > >___________________________________________________________________________= _ >Para recibir mejor tus mensajes, utiliza un PC m=E1s puntero! Aprov=E9chate= de >las mejores ofertas que Dell te propone en exclusiva en i (espa=F1a) >http://www.iespana.es/_reloc/email.dell ____________________________________________________________________________ Para recibir mejor tus mensajes, utiliza un PC más puntero! Aprovéchate de las mejores ofertas que Dell te propone en exclusiva en i (españa) http://www.iespana.es/_reloc/email.dell From brian@ablelinktech.com Wed Nov 6 00:21:06 2002 From: brian@ablelinktech.com (Brian Brown) Date: Tue, 5 Nov 2002 17:21:06 -0700 Subject: [PythonCE] XScale vs ARM Message-ID: Well, I installed the python distribution on a Toshiba e740 (400Mhz XScale), and ran the same pystone tests that I ran on an Amigo (206Mhz StrongARM). Both units have 32MB of RAM and python was running completely from a compact flash card. The Amigo score 217 pystone and executed in 46 seconds. The toshiba scored 147 pystone and executed in 71 seconds. These are averages, although the Amigo was fairly consistent. More so than the e740. Next I'll install python without the CF card and see if that significantly influences it. The code was: import sys from test import pystone if sys.platform != 'win32' and __name__=='__main__': sys.stderr = file('/Storage Card/Test/stderr.txt', 'w', 0) sys.stdout = file('/Storage Card/Test/stoneage.txt', 'w', 0) print "Seconds: %s, Pystones: %s" % pystone.pystones() From bkc@murkworks.com Wed Nov 6 15:23:23 2002 From: bkc@murkworks.com (Brad Clements) Date: Wed, 06 Nov 2002 10:23:23 -0500 Subject: [PythonCE] Thomas Heller's ctypes module Message-ID: <3DC8ECCE.30704.470EF328@localhost> Just found this in the python newsgroup http://starship.python.net/crew/theller/ctypes.html I had written a struct handler in win32gui and Python to support common controls. I think perhaps this is a better mechanism.. comments? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From telionce@yahoo.com Fri Nov 8 19:04:58 2002 From: telionce@yahoo.com (Telion) Date: Fri, 8 Nov 2002 11:04:58 -0800 (PST) Subject: [PythonCE] XScale vs ARM In-Reply-To: Message-ID: <20021108190458.49445.qmail@web21107.mail.yahoo.com> --- Brian Brown wrote: > Well, I installed the python distribution on a Toshiba e740 (400Mhz > XScale), and ran the same pystone tests that I ran on an Amigo (206Mhz > StrongARM). Both units have 32MB of RAM and python was running > completely from a compact flash card. > > The Amigo score 217 pystone and executed in 46 seconds. The toshiba > scored 147 pystone and executed in 71 seconds. These are averages, > although the Amigo was fairly consistent. More so than the e740. > > Next I'll install python without the CF card and see if that > significantly influences it. The code was: > > import sys > from test import pystone > > if sys.platform != 'win32' and __name__=='__main__': > sys.stderr = file('/Storage Card/Test/stderr.txt', 'w', 0) > sys.stdout = file('/Storage Card/Test/stoneage.txt', 'w', 0) > > print "Seconds: %s, Pystones: %s" % pystone.pystones() I tested same thing on my machine. I got 400 pystone and 25 seconds (average) with my copy of python running on CMD.EXE console, and 163.9 pystone with 61 seconds (again average) when I run it with pcceshell.py. So, speed wise, it's much better to skip pcceshell. My machine is MIPS HPC2000, same thing as Intermec 6651. Because I noticed big difference in speed, I will include a command line option for skipping pcceshell when interactive mode is not needed (on PPC). On HPC, this option will automatically invoke CMD.EXE console, and it can be used interactively if you wish. Because of these changes, and also because I was busy, I am behind my schedule for the next release. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From telionce@yahoo.com Fri Nov 8 19:24:11 2002 From: telionce@yahoo.com (Telion) Date: Fri, 8 Nov 2002 11:24:11 -0800 (PST) Subject: [PythonCE] Thomas Heller's ctypes module In-Reply-To: <3DC8ECCE.30704.470EF328@localhost> Message-ID: <20021108192411.91544.qmail@web21110.mail.yahoo.com> --- Brad Clements wrote: > Just found this in the python newsgroup > > http://starship.python.net/crew/theller/ctypes.html > > I had written a struct handler in win32gui and Python to support common > controls. I > think perhaps this is a better mechanism.. > > comments? > I have studied this and yours. Also, there is something the boprhter of Guido made, as well as something called xstruct (if I remember correctly). All aiming similar things, handling C struct (and other types) easily from Python. I chose calldll + edll.py, cs.py (included in HPC distro) for similar purpose because it was easier for my skill level. I was hoping to make something that would read and parse C header file for automatic c-struct object definition, but now I'm too busy with distribution package. If we had C++ self compiler on CE device, thigs could be much easier... By the way, what happens when you do printf() on PPC? On HPC, console(CMD.EXE) is invoked automatically, and the string is printed in it. Where does it go on PPC? ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From bkc@murkworks.com Fri Nov 8 19:40:09 2002 From: bkc@murkworks.com (Brad Clements) Date: Fri, 08 Nov 2002 14:40:09 -0500 Subject: [PythonCE] Thomas Heller's ctypes module In-Reply-To: <20021108192411.91544.qmail@web21110.mail.yahoo.com> References: <3DC8ECCE.30704.470EF328@localhost> Message-ID: <3DCBCBF2.25405.403E10A@localhost> On 8 Nov 2002 at 11:24, Telion wrote: > By the way, what happens when you do printf() on PPC? > On HPC, console(CMD.EXE) is invoked automatically, > and the string is printed in it. > Where does it go on PPC? printf() is not supported on PPC. It doesn't exist. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From telionce@yahoo.com Fri Nov 8 19:53:53 2002 From: telionce@yahoo.com (Telion) Date: Fri, 8 Nov 2002 11:53:53 -0800 (PST) Subject: [PythonCE] Thomas Heller's ctypes module In-Reply-To: <3DCBCBF2.25405.403E10A@localhost> Message-ID: <20021108195353.13800.qmail@web21105.mail.yahoo.com> --- Brad Clements wrote: > On 8 Nov 2002 at 11:24, Telion wrote: > > > By the way, what happens when you do printf() on PPC? > > On HPC, console(CMD.EXE) is invoked automatically, > > and the string is printed in it. > > Where does it go on PPC? > > printf() is not supported on PPC. It doesn't exist. Oh, okey... Then I will create printf, and a few other functions that would print on the window similar to debug message. Thanks for the precision. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From vlegoll@apsydev.com Tue Nov 12 14:06:57 2002 From: vlegoll@apsydev.com (Vincent Legoll) Date: Tue, 12 Nov 2002 15:06:57 +0100 Subject: [PythonCE] XScale report Message-ID: <78EC35D201D3D511921200508BAFE4C38A4EBE@fdmail01.peregrine.com> Hello, I just wanted to inform the list that I successfuly installed PythonCE on an Asus mypal A600 - a XScale 400MHz CE device, I just had enough time to test arithmetical expressions (& print BTW), I will launch a full test suite & pystone later... I have a few questions: Is there some documentation (Howto, FAQ) on how to compile pythonCE from scratch, as I'm willing to investigate speed issues related to XScale-specific compiler optimisations... Are raw Irda-related apis available (through the win32*.py modules, or other...) -- Vincent Legoll From barletta@sony.de Thu Nov 14 15:37:27 2002 From: barletta@sony.de (Barletta, Antonio) Date: Thu, 14 Nov 2002 16:37:27 +0100 Subject: [PythonCE] Running on the CF card Message-ID: Dear All, I read that it is possible to run Python CE on the CF card, because the embedded path for locating libraries is checking also the Storage directory. Unfortunatly I have a german iPAQ and the storage ddirectory is called Speicherkarte; is it possible to set automatically the search path ? thanks **************************************************************************** ******************* The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. This email and any response may be monitored by Sony Europe GmbH. (04) **************************************************************************** ******************* From dale@riverhall.co.uk Fri Nov 15 12:50:26 2002 From: dale@riverhall.co.uk (dale@riverhall.co.uk) Date: Fri, 15 Nov 2002 12:50:26 -0000 Subject: [PythonCE] Running on the CF card Message-ID: <4AC0BFBF3178EF4ABBDF76FA0F98877B1413BF@srv3.out-think.co.uk> I have a similar problem. I've installed Python into the second card slot in my Toshiba e740. This is called "Storage Card2". Python doesn't recognise this. Does anyone know if we can add the path to the registry? Dale Strickland-Clark Riverhall Systems Ltd. Custom database and Web applications. http://www.riverhall.co.uk Offices: London: 0870 321 0034 Wokingham: 0870 321 2378 Mobile 0701 071 DALE (3253) From rjs@blue-cove.com Tue Nov 19 00:30:29 2002 From: rjs@blue-cove.com (Ray Schumacher) Date: Mon, 18 Nov 2002 16:30:29 -0800 Subject: [PythonCE] CE GUI script? Message-ID: <5.2.0.4.0.20021118160805.00af6468@blue-cove.com> Hi all, I've been looking via Google and the list for sample code: Does anyone have a complete 'hello world' script for win32GUI (or any other ample code for GUIs, for that matter). I have no Win32 experience... I've been writing wxPython for a while, but we just got an IPac and I'd like to write a little bicycling app. Ray From vlegoll@apsydev.com Tue Nov 19 09:48:50 2002 From: vlegoll@apsydev.com (Vincent Legoll) Date: Tue, 19 Nov 2002 10:48:50 +0100 Subject: [PythonCE] XScale report In-Reply-To: <78EC35D201D3D511921200508BAFE4C35B838D@fdmail01.peregrine.com> Message-ID: <78EC35D201D3D511921200508BAFE4C38A4ED1@fdmail01.peregrine.com> > I will launch a full test suite & pystone later... Did it, results below: The "test_all" give me some failures, are people interested in a complete report including output files ? pystone with system configured with maximized power saving option ~25, ouch, but you'll get what you asked for, so... When configured for performance, I got around 150 which is barely standard for a 400MHz XScale, I think... BTW, what is the methodology to get that python binary compiled ? I wonder what was the compiler's target & optimization settings: -marm, -mthumb, or something else... Or am I completely off base and it has not been compiled with gcc... I'm having trouble building a cross gcc (i686-linux as host arm-wince-pe as target) If someone has any clue... -- Vince From Olivier.Fambon@xrce.xerox.com Fri Nov 22 14:32:37 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Fri, 22 Nov 2002 15:32:37 +0100 Subject: [PythonCE] Server socket + MessageBox hangs ? Message-ID: Hi there, I try to telnet into a Python server on my iPaq (CE3.0). [see server script bellow] First connection is ok, the pop-up appears. Is it just me, or does this hang on the second connection ? I have to reboot to get the Compaq-quick-button functionnal. Commenting-out the MessageBox line behaves as expected. Any hint ? # Echo server program import socket, win32gui def doServer(host='', port=2000): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) s.listen(1) while 1: print 'waiting for connection on ', port conn, addr = s.accept() print 'Connected by', addr win32gui.MessageBox(0, text, title, 1) while 1: data = conn.recv(1024) if not data: conn.close() break conn.send(data) del conn, addr print 'Exiting' if __name__ == '__main__': doServer() From visionindustrial@yahoo.com Wed Nov 27 02:44:42 2002 From: visionindustrial@yahoo.com (Vision Industrial) Date: Tue, 26 Nov 2002 18:44:42 -0800 (PST) Subject: [PythonCE] calldll error Message-ID: <20021127024442.86004.qmail@web13502.mail.yahoo.com> Hi when I import calldll a get "DLL load failed with error code 126" please help me Jose __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From telionce@yahoo.com Wed Nov 27 15:56:15 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 07:56:15 -0800 (PST) Subject: [PythonCE] calldll error In-Reply-To: <20021127024442.86004.qmail@web13502.mail.yahoo.com> Message-ID: <20021127155615.40316.qmail@web21101.mail.yahoo.com> --- Vision Industrial wrote: > Hi > when I import calldll a get "DLL load failed with > error code 126" > please help me > > Jose seems to be "module not found". Maybe you don't have calldll.pyd in apropreate directory. Please read this wiki page for more detail. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/StartingPython If you want better assistance, please specify your machine, which version of PythonCE you are using, etc. The answer for most questions can be found in PythonCE Wiki. PythonCE Wiki Top page http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/FrontPage ===== 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 From telionce@yahoo.com Wed Nov 27 15:56:57 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 07:56:57 -0800 (PST) Subject: [PythonCE] Delay foe the next release Message-ID: <20021127155657.50985.qmail@web21108.mail.yahoo.com> As I have been busy, again, next release of PythonCE2.2+ for HPC2000 will be delayed. When I have 3,4 days I can concentrate on the project, it will be done. ===== 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 From telionce@yahoo.com Wed Nov 27 16:54:43 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 08:54:43 -0800 (PST) Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: Message-ID: <20021127165443.27921.qmail@web21103.mail.yahoo.com> --- Olivier Fambon wrote: > > Hi there, > > I try to telnet into a Python server on my iPaq (CE3.0). [see server > script bellow] > > First connection is ok, the pop-up appears. > > Is it just me, or does this hang on the second connection ? > > I have to reboot to get the Compaq-quick-button functionnal. > > Commenting-out the MessageBox line behaves as expected. > > Any hint ? > > # Echo server program > import socket, win32gui > > def doServer(host='', port=2000): > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.bind((host, port)) > s.listen(1) > while 1: > print 'waiting for connection on ', port > conn, addr = s.accept() > print 'Connected by', addr text = "test text" title = "test title" > win32gui.MessageBox(0, text, title, 1) > > while 1: > data = conn.recv(1024) > if not data: > conn.close() > break > conn.send(data) > del conn, addr > print 'Exiting' > > if __name__ == '__main__': > doServer() > By adding above two lines, this script worked fine on my machine. (PythonCE2.2+ on HPC2000) I connected with Teraterm telnet software, disconnected, and reconnected without problem. Maybe you should check if you are not trying to run 2nd copy of Python while the server is still active (but not visible due to the PPC interface). ===== 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 From telionce@yahoo.com Wed Nov 27 17:06:14 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 09:06:14 -0800 (PST) Subject: [PythonCE] XScale report In-Reply-To: <78EC35D201D3D511921200508BAFE4C38A4ED1@fdmail01.peregrine.com> Message-ID: <20021127170614.57824.qmail@web21101.mail.yahoo.com> --- Vincent Legoll wrote: > > I will launch a full test suite & pystone later... > > Did it, results below: > > The "test_all" give me some failures, are people > interested in a complete report including output > files ? > > pystone with system configured with maximized > power saving option ~25, ouch, but you'll get what > you asked for, so... > > When configured for performance, I got around 150 > which is barely standard for a 400MHz XScale, I > think... > > BTW, what is the methodology to get that python > binary compiled ? I wonder what was the compiler's > target & optimization settings: -marm, -mthumb, > or something else... > > Or am I completely off base and it has not been > compiled with gcc... I'm having trouble building a > cross gcc (i686-linux as host arm-wince-pe as > target) If someone has any clue... > > -- > Vince All builds of PythonCE2.2+ are compiled with eVC. I'm not sure at all if you can build with gcc. Probably, you may need to modify Python source code, too. But if you can make it, that may eliminate some MicroSoft specific problems. I'm a little fed up with MS marketing strategy and thinking about buying Linux PDA. Then I can forget about lots of rather stupid problems. ===== 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 From vlegoll@apsydev.com Wed Nov 27 17:24:49 2002 From: vlegoll@apsydev.com (Vincent Legoll) Date: Wed, 27 Nov 2002 18:24:49 +0100 Subject: [PythonCE] XScale report In-Reply-To: <78EC35D201D3D511921200508BAFE4C38F6CD2@fdmail01.peregrine.com> Message-ID: <78EC35D201D3D511921200508BAFE4C38A4EE9@fdmail01.peregrine.com> > All builds of PythonCE2.2+ are compiled with eVC. Argh... BTW, is the full procedure documented somewhere ? I'm not even a newbie wrt eVC... > I'm not sure at all if you can build with gcc. > Probably, you may need to modify Python > source code, too. But python already builds properly with gcc, under linux for example ;-) So the changes won't need to be so large, I hope... > But if you can make it, that may eliminate some > MicroSoft specific problems. I got binutils & gcc built targetting arm-wince-pe, but currently having problems with libc (only tried newlib...) > I'm a little fed up with MS marketing strategy and > thinking about buying Linux PDA. > Then I can forget about lots of rather stupid problems. I think I'll go with Linux on my CE device when possible but since it's a recent one, I don't think it's ready yet... -- Vince From dale@riverhall.co.uk Wed Nov 27 17:27:03 2002 From: dale@riverhall.co.uk (dale@riverhall.co.uk) Date: Wed, 27 Nov 2002 17:27:03 -0000 Subject: [PythonCE] Start-up search path Message-ID: <4AC0BFBF3178EF4ABBDF76FA0F98877B141405@srv3.out-think.co.uk> Could we have some way of overriding the path(s) Python checks on starting to locate the main Python directories. I have my files loaded into "Storage Card2\Program Files\Python" but this doesn't work. There was a little discussion about this recently but no solution that I could use. Is the source available online anywhere? I could probably make the necessary source hacks. Not sure I have the tools to recompile, though. Cheers. Dale Strickland-Clark Riverhall Systems Ltd. Custom database and Web applications. http://www.riverhall.co.uk Offices: London: 0870 321 0034 Wokingham: 0870 321 2378 Mobile 0701 071 DALE (3253) From telionce@yahoo.com Wed Nov 27 17:38:04 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 09:38:04 -0800 (PST) Subject: [PythonCE] Start-up search path In-Reply-To: <4AC0BFBF3178EF4ABBDF76FA0F98877B141405@srv3.out-think.co.uk> Message-ID: <20021127173804.48125.qmail@web21107.mail.yahoo.com> --- dale@riverhall.co.uk wrote: > Could we have some way of overriding the path(s) Python checks on starting > to locate the main Python directories. I have my files loaded into "Storage > Card2\Program Files\Python" but this doesn't work. You may find what you need in this page. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/StartingPython > > There was a little discussion about this recently but no solution that I > could use. > > Is the source available online anywhere? I could probably make the necessary > source hacks. Not sure I have the tools to recompile, though. Source is here. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/Releases For how to develop Win CE software, consult MS-site. Basically you need eVC (free from MS). > > Cheers. > > Dale Strickland-Clark > Riverhall Systems Ltd. Custom database and Web applications. > http://www.riverhall.co.uk > Offices: London: 0870 321 0034 Wokingham: 0870 321 2378 > Mobile 0701 071 DALE (3253) > ===== 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 From telionce@yahoo.com Wed Nov 27 17:54:09 2002 From: telionce@yahoo.com (Telion) Date: Wed, 27 Nov 2002 09:54:09 -0800 (PST) Subject: [PythonCE] XScale report In-Reply-To: <78EC35D201D3D511921200508BAFE4C38A4EE9@fdmail01.peregrine.com> Message-ID: <20021127175409.58166.qmail@web21102.mail.yahoo.com> --- Vincent Legoll wrote: > > All builds of PythonCE2.2+ are compiled with eVC. > > Argh... BTW, is the full procedure documented > somewhere ? I'm not even a newbie wrt eVC... Here is some info. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/DevelopmentInfo > > > I'm not sure at all if you can build with gcc. > > Probably, you may need to modify Python > > source code, too. > > But python already builds properly with gcc, under linux > for example ;-) So the changes won't need to be so large, > I hope... I'm talking about CE. You will have to work a lot, I guess. But if you are good, it may take only a few weeks. So, I can't say if it is going to be easy for you or not. For me, it wood take many many months, because I don't have experience on that area. > > > But if you can make it, that may eliminate some > > MicroSoft specific problems. > > I got binutils & gcc built targetting arm-wince-pe, but > currently having problems with libc (only tried newlib...) Did you try rahter simple program to begin with? > > > I'm a little fed up with MS marketing strategy and > > thinking about buying Linux PDA. > > Then I can forget about lots of rather stupid problems. > > I think I'll go with Linux on my CE device when possible > but since it's a recent one, I don't think it's ready yet... > > -- > Vince I'll buy something with Linux already installed. That way, I don't have to pay for MS OS I don't need. There are several choices already. Python is runnning on some of them, I think. ===== 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 From Olivier.Fambon@xrce.xerox.com Thu Nov 28 10:28:13 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Thu, 28 Nov 2002 11:28:13 +0100 Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: <20021127165443.27921.qmail@web21103.mail.yahoo.com> (Telion's message of "Wed, 27 Nov 2002 08:54:43 -0800 (PST)") References: <20021127165443.27921.qmail@web21103.mail.yahoo.com> Message-ID: Telion [Wed, 27 Nov 2002 08:54:43 -0800 (PST)] wrote: > > By adding above two lines, Yes, sorry for the bad copy/paste. > this script worked fine on my machine. (PythonCE2.2+ on HPC2000) Mine is an iPaq 3660, CE3.0 (fr), PythonCE2.2+ (cab) > I connected with Teraterm telnet software, disconnected, > and reconnected without problem. I use a unix telnet, but I guess it should not cause a hang. I also tried with an NT telnet. The thing is not that I am not able to connect - at socket level- a second time... Actually, it _does_ connect, but it hangs - in accept(): there is no message [print], no message box, and from there on I can not connect a 3rd time. > Maybe you should check if you are not trying to run > 2nd copy of Python while the server is still active > (but not visible due to the PPC interface). No other Python running (I reboot on every test :). This even-simpler script shows the same behaviour: no message box on the second connection, and kills the Q-menu. # Blocks on accept() on second connection on iPaq 3660 CE3.0 PyCE2.2+ # Commenting out the win32gui.MessageBox cures the hanging import socket, win32gui def doServer(host='', port=2000): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) s.listen(1) while 1: print 'waiting for connection on ', port conn, addr = s.accept() print 'Connected by', addr[0] win32gui.MessageBox(0, "Lo", "Title", 1) conn.close() doServer() From Olivier.Fambon@xrce.xerox.com Fri Nov 29 14:46:37 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Fri, 29 Nov 2002 15:46:37 +0100 Subject: [PythonCE] Unix->CE. Telnet into your PythonCE ! Message-ID: --=-=-= Hi there, I don't know if it might be of any use to you WindoZ-enabled people... Might be trivial too. However, I can share my practice here [and may be update the Wiki pages ?] Enjoy. A+O. For people who have no Windows+ActiveSync machine at hand, only an iPaq+WLan. 1/ Install To install PythonCE, downloaded the cab via IE. As long as you can stick the cab on some [Wlan-accessible] web server (*), it's fine. The plot is that you have no "save-as" in IE... However, browsed files are stored locally in /Windows/Temporary Internet Files/ There are several tmp dirs. Spot the one containing the cab with File Exploder, and click the cab. 2/ Testing/Running scripts You can develop scripts on a host, serve them via a web server, and execute them via IE. Just set the mime-type for .py files to application/python, and IE will run Python for you. Mime-types are in web.xml for Tomcat, or use (*) SimpleHTTPServer as web-server and hack the mime-types mappings [see trace bellow] --=-=-= Content-Disposition: attachment Python 2.2.2 (#2, Nov 19 2002, 14:36:35) [GCC 3.2] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import SimpleHTTPServer >>> SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map.update({'.py':'application/python'}) >>> SimpleHTTPServer.test() Serving HTTP on 0.0.0.0 port 8000 ... --=-=-= 3/ Handy Python prompt In case you would like to have a usable python prompt - and a keyboard, you can telnet into your PythonCE. Just run pysrv.py on your PythonCE [see script bellow], and telnet into it [or use a python telnet-client like for history may be]. The script is a modified [and not-fully-ok ] copy/paste from Python-1.5.2/Demo/pysvr/pysvr.py Note that there are other [non-threaded] such server scripts out there which might work better... --=-=-= Content-Disposition: attachment #! /usr/bin/env python """A multi-threaded telnet-like server that gives a Python prompt. This is really a prototype for the same thing in C. Usage: pysvr.py [port] For security reasons, it only accepts requests from the current host. This can still be insecure, but restricts violations from people who can log in on your machine. Use with caution! """ import sys, os, string, getopt, thread, socket, traceback PORT = 23 # Default port def main(): try: opts, args = getopt.getopt(sys.argv[1:], "") if len(args) > 1: raise getopt.error, "Too many arguments." except getopt.error, msg: usage(msg) for o, a in opts: pass if args: try: port = string.atoi(args[0]) except ValueError, msg: usage(msg) else: port = PORT main_thread(port) def usage(msg=None): sys.stdout = sys.stderr if msg: print msg print "\n", __doc__, sys.exit(2) def main_thread(port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("", port)) sock.listen(5) print "Listening on port", port, "..." while 1: (conn, addr) = sock.accept() thread.start_new_thread(service_thread, (conn, addr)) del conn, addr def service_thread(conn, addr): (caddr, cport) = addr print "Thread %s has connection from %s.\n" % (str(thread.get_ident()), caddr), stdin = conn.makefile("r") stdout = conn.makefile("w", 0) run_interpreter(stdin, stdout) print "Thread %s is done.\n" % str(thread.get_ident()), def run_interpreter(stdin, stdout): globals = {} try: str(sys.ps1) except: sys.ps1 = ">>> " source = "" while 1: stdout.write(sys.ps1) line = stdin.readline() if line[:2] == '\377\354': line = "" if not line and not source: break if line[-2:] == '\r\n': # normalize windoz clients line = line[:-2] + '\n' source = source + line[:-1] # no newline for compile try: code = compile_command(source) except SyntaxError, err: source = "" #traceback.print_exception(SyntaxError, err, None, file=stdout) continue if not code: continue source = "" try: run_command(code, stdin, stdout, globals) except SystemExit, how: if how: try: how = str(how) except: how = "" stdout.write("Exit %s\n" % how) break stdout.write("\nGoodbye.\n") def run_command(code, stdin, stdout, globals): save = sys.stdin, sys.stdout, sys.stderr try: sys.stdout = sys.stderr = stdout sys.stdin = stdin try: exec code in globals except SystemExit, how: raise SystemExit, how, sys.exc_info()[2] except: type, value, tb = sys.exc_info() if tb: tb = tb.tb_next #traceback.print_exception(type, value, tb) # kills telnet client print "error:", value del tb finally: sys.stdin, sys.stdout, sys.stderr = save from code import compile_command main() --=-=-=-- From Olivier.Fambon@xrce.xerox.com Fri Nov 29 15:29:05 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Fri, 29 Nov 2002 16:29:05 +0100 Subject: [PythonCE] Re: Unix->CE. Telnet into your PythonCE ! In-Reply-To: (Olivier Fambon's message of "Fri, 29 Nov 2002 15:46:37 +0100") References: Message-ID: ... and 4/ Browsing your CE device You can launch a web-server on your PythonCE [same as 2/] import SimpleHTTPServer SimpleHTTPServer.test() Just mind the [required] trailing / on dirs in your browser if you want it to be usable [like http://:8000/My Documents/] From telionce@yahoo.com Fri Nov 29 16:58:19 2002 From: telionce@yahoo.com (Telion) Date: Fri, 29 Nov 2002 08:58:19 -0800 (PST) Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: Message-ID: <20021129165819.89593.qmail@web21109.mail.yahoo.com> --- Olivier Fambon wrote: > > this script worked fine on my machine. (PythonCE2.2+ on HPC2000) > > Mine is an iPaq 3660, CE3.0 (fr), PythonCE2.2+ (cab) What is the URL of the cab distribution you are using? Do you know who made it? > > I connected with Teraterm telnet software, disconnected, > > and reconnected without problem. > > I use a unix telnet, but I guess it should not cause a hang. I also > tried with an NT telnet. I don't think Telnet client is the issue. I used Telnet client running on CE. > The thing is not that I am not able to connect - at socket level- a > second time... Actually, it _does_ connect, but it hangs - in > accept(): there is no message [print], no message box, and from there > on I can not connect a 3rd time. Did you try pdb? > > Maybe you should check if you are not trying to run > > 2nd copy of Python while the server is still active > > (but not visible due to the PPC interface). > > No other Python running (I reboot on every test :). What do you mean by "reboot" ? "Hard reset" ? "Soft reset" ? Something else ? > This even-simpler script shows the same behaviour: no message box on > the second connection, and kills the Q-menu. > > > # Blocks on accept() on second connection on iPaq 3660 CE3.0 PyCE2.2+ > # Commenting out the win32gui.MessageBox cures the hanging How did you invoke your script? From Python Prompt ? "Start menu"/Run ? (If it exists in PPC) Short cut ? Some other methods ? If you are running "PythonCE2.2+ for HPC2000" on your iPaq (which is PPC), win32gui module may cause some problems. ===== 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 From Olivier.Fambon@xrce.xerox.com Fri Nov 29 17:12:07 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Fri, 29 Nov 2002 18:12:07 +0100 Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: <20021129165819.89593.qmail@web21109.mail.yahoo.com> (Telion's message of "Fri, 29 Nov 2002 08:58:19 -0800 (PST)") References: <20021129165819.89593.qmail@web21109.mail.yahoo.com> Message-ID: Telion [Fri, 29 Nov 2002 08:58:19 -0800 (PST)] wrote: > > What is the URL of the cab distribution you are using? http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/PythonCE22_hpc2000.arm.CAB > Do you know who made it? No > I don't think Telnet client is the issue. Neither do I. >> The thing is not that I am not able to connect - at socket level- a >> second time... Actually, it _does_ connect, but it hangs - in >> accept(): there is no message [print], no message box, and from there >> on I can not connect a 3rd time. > > Did you try pdb? Nope :( >> No other Python running (I reboot on every test :). > > What do you mean by "reboot" ? Soft reset > > How did you invoke your script? > Some other methods ? Via IE. > 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. From Olivier.Fambon@xrce.xerox.com Fri Nov 29 17:25:29 2002 From: Olivier.Fambon@xrce.xerox.com (Olivier Fambon) Date: Fri, 29 Nov 2002 18:25:29 +0100 Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: (Olivier Fambon's message of "Fri, 29 Nov 2002 18:12:07 +0100") References: <20021129165819.89593.qmail@web21109.mail.yahoo.com> Message-ID: > 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 ? 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 From telionce@yahoo.com Fri Nov 29 18:09:19 2002 From: telionce@yahoo.com (Telion) Date: Fri, 29 Nov 2002 10:09:19 -0800 (PST) Subject: [PythonCE] Unix->CE. Telnet into your PythonCE ! In-Reply-To: Message-ID: <20021129180919.96371.qmail@web21102.mail.yahoo.com> --- Olivier Fambon wrote: > > Hi there, > > I don't know if it might be of any use to you WindoZ-enabled people... > > Might be trivial too. However, I can share my practice here > [and may be update the Wiki pages ?] > > Enjoy. > > A+O. > > > For people who have no Windows+ActiveSync machine at hand, only an > iPaq+WLan. > > 1/ Install > > To install PythonCE, downloaded the cab via IE. As long as you can > stick the cab on some [Wlan-accessible] web server (*), it's fine. > > The plot is that you have no "save-as" in IE... However, browsed files > are stored locally in /Windows/Temporary Internet Files/ > > There are several tmp dirs. Spot the one containing > the cab with File Exploder, and click the cab. > > > 2/ Testing/Running scripts > > You can develop scripts on a host, serve them via a web server, and > execute them via IE. > > Just set the mime-type for .py files to application/python, and IE > will run Python for you. I don't recommend doing this. Someone may setup a web page with very nasty python code for you. Rather than that, IE will ask for Execute with associated program, or Save that file. for most unknown type. If you are testing the script you made, you can simply choose to execute, providing .py and .pyc is associated with Python in the registry. > > Mime-types are in web.xml for Tomcat, or use (*) SimpleHTTPServer as > web-server and hack the mime-types mappings [see trace bellow] > > > Python 2.2.2 (#2, Nov 19 2002, 14:36:35) > [GCC 3.2] on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > >>> import SimpleHTTPServer > >>> > SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map.update({'.py':'application/python'}) > >>> SimpleHTTPServer.test() > Serving HTTP on 0.0.0.0 port 8000 ... > > > > > 3/ Handy Python prompt > > In case you would like to have a usable python prompt - and a > keyboard, you can telnet into your PythonCE. > > Just run pysrv.py on your PythonCE [see script bellow], and telnet > into it [or use a python telnet-client like for history may be]. > > The script is a modified [and not-fully-ok ] copy/paste from > Python-1.5.2/Demo/pysvr/pysvr.py > > Note that there are other [non-threaded] such server scripts out there > which might work better... > You should be very careful if your machine is connected to Lan/Wan. I would not run pysvr and any other server script unless; my machine is not connected, or script has adequate security measure. If you add these lines; if not addr[0]=="127.0.0.1": print "Bad addr", addr break right after (conn, addr) = sock.accept it would be safer. You can add any safe address, too. if addr[0]!="127.0.0.1" and addr[0][:6]!="192.168": ===== 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 From telionce@yahoo.com Fri Nov 29 18:41:32 2002 From: telionce@yahoo.com (Telion) Date: Fri, 29 Nov 2002 10:41:32 -0800 (PST) Subject: [PythonCE] Server socket + MessageBox hangs ? In-Reply-To: Message-ID: <20021129184132.7759.qmail@web21109.mail.yahoo.com> --- Olivier Fambon 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