From kitsune_e at yahoo.com Wed Mar 1 18:29:24 2006 From: kitsune_e at yahoo.com (Ed Blake) Date: Wed, 1 Mar 2006 09:29:24 -0800 (PST) Subject: [PythonCE] IdleCE In-Reply-To: <1308467525.20060228200612@klankschap.nl> Message-ID: <20060301172924.76767.qmail@web50206.mail.yahoo.com> --- vm at klankschap.nl wrote: > > where is the content of the zip file best stored? > in the folder? > /storage card/python/ > > and what should go in the folder: > /storage card/python/lib > I have a folder on my storage card called 'scripts', and under that a folder for IdleCE. The editor.py file _must_ be in 'whatever/python/lib' because it is a module (and because paths are messed up on WinCE). After that I copy the IdleCE file and 'paste as shortcut' into '/windows/start menu' so that it is easily available on the start menu! > > did you manage to get wx running? > I never really tried. Every time I look at Wx it goes the same way: I check out the demos and am wowed by the great widgets/events/applications it can handle, then I check out the code and find that it is obtuse, sparsely commented (for example code), and generally confusing... Last time I checked out Wx (~ 2 Mo. ago) things were put together better, and the documentation was becoming rather good/complete. It just doesn't do anything which would compel me to switch though, and it seems rather more complicated than Tkinter. From fuzzyman at voidspace.org.uk Wed Mar 1 19:42:03 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 01 Mar 2006 18:42:03 +0000 Subject: [PythonCE] IdleCE In-Reply-To: <20060301172924.76767.qmail@web50206.mail.yahoo.com> References: <20060301172924.76767.qmail@web50206.mail.yahoo.com> Message-ID: <4405EAFB.70902@voidspace.org.uk> Ed Blake wrote: > [snip..] >> did you manage to get wx running? >> >> > > I never really tried. Every time I look at Wx it goes the same way: > I check out the demos and am wowed by the great widgets/events/applications > it can handle, then I check out the code and find that it is obtuse, sparsely > commented (for example code), and generally confusing... > > Last time I checked out Wx (~ 2 Mo. ago) things were put together better, and > the documentation was becoming rather good/complete. It just doesn't do > anything which would compel me to switch though, and it seems rather more > complicated than Tkinter. > You ought to check out Wax. It's a friendly Pythonic layer that sits atop of wx and IMHO is just as easy to use as Tkinter. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > From brian at ablelinktech.com Wed Mar 1 20:28:47 2006 From: brian at ablelinktech.com (Brian Brown) Date: Wed, 1 Mar 2006 12:28:47 -0700 Subject: [PythonCE] IdleCE In-Reply-To: <4405EAFB.70902@voidspace.org.uk> References: <20060301172924.76767.qmail@web50206.mail.yahoo.com> <4405EAFB.70902@voidspace.org.uk> Message-ID: <4EC96C8A-8B4A-4919-ABBD-A1882BDFB884@ablelinktech.com> On Mar 1, 2006, at 11:42 AM, Michael Foord wrote: > Ed Blake wrote: >> [snip..] >>> did you manage to get wx running? >>> >>> >> >> I never really tried. Every time I look at Wx it goes the same way: >> I check out the demos and am wowed by the great widgets/events/ >> applications >> it can handle, then I check out the code and find that it is >> obtuse, sparsely >> commented (for example code), and generally confusing... >> >> Last time I checked out Wx (~ 2 Mo. ago) things were put together >> better, and >> the documentation was becoming rather good/complete. It just >> doesn't do >> anything which would compel me to switch though, and it seems >> rather more >> complicated than Tkinter. >> > You ought to check out Wax. It's a friendly Pythonic layer that sits > atop of wx and IMHO is just as easy to use as Tkinter. Well, there is also our skinning framework - you specify the GUI in XML, but inline python is a major part of it. It was designed to allow sending an functional GUI page over jabber or some other transport. There are a lot of other interesting tools at the project as well: http://www.techgame.net/projects/framework Get it and check out the demos. Brian btw, it's BSD licensed. From fuzzyman at voidspace.org.uk Wed Mar 1 22:15:22 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 01 Mar 2006 21:15:22 +0000 Subject: [PythonCE] IdleCE In-Reply-To: <4EC96C8A-8B4A-4919-ABBD-A1882BDFB884@ablelinktech.com> References: <20060301172924.76767.qmail@web50206.mail.yahoo.com> <4405EAFB.70902@voidspace.org.uk> <4EC96C8A-8B4A-4919-ABBD-A1882BDFB884@ablelinktech.com> Message-ID: <44060EEA.7080104@voidspace.org.uk> Brian Brown wrote: > On Mar 1, 2006, at 11:42 AM, Michael Foord wrote: > > >> Ed Blake wrote: >> >>> [snip..] >>> >>>> did you manage to get wx running? >>>> >>>> >>>> >>> I never really tried. Every time I look at Wx it goes the same way: >>> I check out the demos and am wowed by the great widgets/events/ >>> applications >>> it can handle, then I check out the code and find that it is >>> obtuse, sparsely >>> commented (for example code), and generally confusing... >>> >>> Last time I checked out Wx (~ 2 Mo. ago) things were put together >>> better, and >>> the documentation was becoming rather good/complete. It just >>> doesn't do >>> anything which would compel me to switch though, and it seems >>> rather more >>> complicated than Tkinter. >>> >>> >> You ought to check out Wax. It's a friendly Pythonic layer that sits >> atop of wx and IMHO is just as easy to use as Tkinter. >> > > Well, there is also our skinning framework - you specify the GUI in > XML, but inline python is a major part of it. It was designed to > allow sending an functional GUI page over jabber or some other > transport. There are a lot of other interesting tools at the project > as well: http://www.techgame.net/projects/framework > > Get it and check out the demos. > Wow, looks interesting. With a Python stub on the client program you can dynamically serve applications. That all depends on how good your XML skinning protocol is of course. ;-) I wonder if it would still work with Wax... just thinking aloud. Anyway, I'll take a look at it. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Brian > > btw, it's BSD licensed. > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > From jeff_barish at earthlink.net Thu Mar 2 03:35:05 2006 From: jeff_barish at earthlink.net (Jeffrey Barish) Date: Wed, 1 Mar 2006 19:35:05 -0700 Subject: [PythonCE] =?iso-8859-1?q?Running_Python_program_without_getting_?= =?iso-8859-1?q?Python_CE=A0window?= Message-ID: <200603011935.05301.jeff_barish@earthlink.net> ----- Original Message ----- From: "Jeffrey Barish" To: Sent: Friday, February 24, 2006 11:08 AM Subject: [PythonCE] Running Python program without getting Python CE window > > Whenever I run a Python application, I get a window titled "Python CE" that > > seems to capture stdout. ?Is it called the console? ?I would like to run my > > application without getting that window. ?I had the impression that this > > window would not appear if I ran the application using pythonw. ?To that > > end, I changed the first line of my application to > > > > #! /usr/bin/env pythonw > > > > (instead of /usr/bin/env/python). ?Changing this line has no effect in > > either CE or XP. ?What is the correct procedure? > > As somebody else mentioned, that is a Unix-specific feature. In Windows XP > you can rename the file to .pyw to run it automatically with pythonw.exe. On > Windows CE there is no standard way but this might help: > > python /nopcceshell program.py > > Luke Forgive my continued ignorance. Changing the extension works fine in XP to suppress the console window, but I don't understand how to enter the command you suggested in CE. Did you find a console for CE that permits you to type in commands? Does CE come with one (that I have been unable to locate)? I also posted a related question last week, but I never saw my message in the digest (which happens frequently). I am also wondering what the procedure is for attaching an icon to my application so that I can run the application by tapping the icon? And, to be precise, what I would like is to run my Python program in such a way that the console window does not appear. Perhaps tapping the icon would run the command that you suggested above. -- Jeffrey Barish From jeff_barish at earthlink.net Thu Mar 2 03:46:50 2006 From: jeff_barish at earthlink.net (Jeffrey Barish) Date: Wed, 1 Mar 2006 19:46:50 -0700 Subject: [PythonCE] Unicode default encoding Message-ID: <200603011946.50366.jeff_barish@earthlink.net> > Luke Dunstan wrote: >> ----- Original Message ----- >> From: "Jeffrey Barish" >> To: >> Sent: Friday, February 24, 2006 11:03 AM >> Subject: [PythonCE] Unicode default encoding >> ? >>> What is the correct way to set PythonCE's default Unicode encoding? ?My >>> reading (Python in a Nutshell) indicates that I am supposed to make a >>> change to site.py, but there doesn't seem to be a site.py in >>> PythonCE. ?(The closest I came is a site.pyc in python23.zip.) ?Nutshell >>> suggests that in desperation one could put the following at the start of >>> the main script: >>> >>> import sys >>> reload(sys) >>> sys.setdefaultencoding('iso-8859-15') >>> del sys.setdefaultencoding >>> >>> This code solved the problem I was having reading and processing text that >>> contains Unicode characters, but I am uncomfortable leaving a desperation >>> solution in place. >>> >> >> I don't think modifying site.py would be a good solution, because if you >> upgrade or reinstall python then the script will be overwritten. If you >> only want to run your program on your own system then a better solution is >> to create a file sitecustomize.py in your Python\Lib directory containing >> this: >> >> import sys >> sys.setdefaultencoding('iso-8859-15') >> >> If you want to distribute your program to other people though, you can't >> expect them to change their default encoding so it is better not to rely on >> the default encoding at all. >> >> ? > Yep, using unicode and explicitly encoding/decoding is a better approach. > > Fuzzyman Once again, I am forced to display my ignorance. Sorry guys. I really don't know much about Unicode. The solution that Luke suggested (sitecustomize.py in my Python\Lib directory) works fine for me, but I am concerned about the suggestion from him and Fuzzyman that explicit encoding/decoding is a better approach. What is explicit encoding/decoding? Can someone point me to a good resource for learning how to deal with Unicode correctly? -- Jeffrey Barish From jeff_barish at earthlink.net Thu Mar 2 04:27:41 2006 From: jeff_barish at earthlink.net (Jeffrey Barish) Date: Wed, 1 Mar 2006 20:27:41 -0700 Subject: [PythonCE] Warning about comctl32.dll Message-ID: <200603012027.42031.jeff_barish@earthlink.net> > > Some of my applications are now triggering a warning when they first start > > running that reads: > > > > Please install a newer version of comctl32.dll (at least version 4.70 is > > required but you have 0.00) or the program won't operate correctly. > > If I search for this message on Google it appears only in wxWidgets source > code, so I suggest you ask on their mailing list. > > Luke I did post a message, as you suggested. In case anyone is interested, the response that I got was: > It seems in 2_6_BRANCH of wxWidgets source repository this message occur in > wxW/src/msw/listctrl.cpp when wxLC_VIRTUAL flag is used. The version of wx that runs on WinCE is 2.5.2.8u, but the symptoms match. All my test programs that contain a list control in virtual mode produce the error message and those with a list control in normal mode do not. I am still searching for a solution to this problem. -- Jeffrey Barish From fuzzyman at voidspace.org.uk Thu Mar 2 10:35:26 2006 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Thu, 02 Mar 2006 09:35:26 +0000 Subject: [PythonCE] Unicode default encoding In-Reply-To: <200603011946.50366.jeff_barish@earthlink.net> References: <200603011946.50366.jeff_barish@earthlink.net> Message-ID: <4406BC5E.50501@voidspace.org.uk> Jeffrey Barish wrote: >>Luke Dunstan wrote: >> >> >>>----- Original Message ----- >>>From: "Jeffrey Barish" >>>To: >>>Sent: Friday, February 24, 2006 11:03 AM >>>Subject: [PythonCE] Unicode default encoding >>> >>> >>> >>>>What is the correct way to set PythonCE's default Unicode encoding? My >>>>reading (Python in a Nutshell) indicates that I am supposed to make a >>>>change to site.py, but there doesn't seem to be a site.py in >>>>PythonCE. (The closest I came is a site.pyc in python23.zip.) Nutshell >>>>suggests that in desperation one could put the following at the start of >>>>the main script: >>>> >>>>import sys >>>>reload(sys) >>>>sys.setdefaultencoding('iso-8859-15') >>>>del sys.setdefaultencoding >>>> >>>>This code solved the problem I was having reading and processing text that >>>>contains Unicode characters, but I am uncomfortable leaving a desperation >>>>solution in place. >>>> >>>> >>>> >>>I don't think modifying site.py would be a good solution, because if you >>>upgrade or reinstall python then the script will be overwritten. If you >>>only want to run your program on your own system then a better solution is >>>to create a file sitecustomize.py in your Python\Lib directory containing >>>this: >>> >>>import sys >>>sys.setdefaultencoding('iso-8859-15') >>> >>>If you want to distribute your program to other people though, you can't >>>expect them to change their default encoding so it is better not to rely on >>>the default encoding at all. >>> >>> >>> >>> >>Yep, using unicode and explicitly encoding/decoding is a better approach. >> >>Fuzzyman >> >> > >Once again, I am forced to display my ignorance. Sorry guys. I really don't >know much about Unicode. The solution that Luke suggested (sitecustomize.py >in my Python\Lib directory) works fine for me, but I am concerned about the >suggestion from him and Fuzzyman that explicit encoding/decoding is a better >approach. What is explicit encoding/decoding? Can someone point me to a >good resource for learning how to deal with Unicode correctly? > > Unicode, and text encodings in general, is a bit of a learning curve. Once you get your head round it, Python makes it pretty straightforward. Simple rules : * In Python text *really* means a unicode string * Because ordinary strings are really just strings of bytes * If you know the encoding, decode it to turn it into encoding * When writing or printing, encode it to turn it back into bytes * If you don't know the encoding then you better pray that whatever it is is encoded in the system default. ;-) byte_string = open(filename).read() # read a file text = byte_string.decode('utf_8') # we know it is UTF8, so we decode to unicode # ....code that uses the text byte_string = text.encode('utf_8') # we encode it back to UTF8 open(filename, 'w').write(byte_string) # so we can write it back out Decoding turns a byte string into a unicode object. Encoding turns a unicode object into a byte string. If this still confuses you (which it probably does) then there are lots of good resources. I happen to like : http://www.pyzine.com/Issue008/Section_Articles/article_Encodings.html Which seems to be down at the moment. :-( All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml From jan.ischebeck at p3-gmbh.de Thu Mar 2 11:19:49 2006 From: jan.ischebeck at p3-gmbh.de (Ischebeck, Jan) Date: Thu, 2 Mar 2006 11:19:49 +0100 Subject: [PythonCE] Unicode default encoding References: <200603011946.50366.jeff_barish@earthlink.net> <4406BC5E.50501@voidspace.org.uk> Message-ID: Just to add my 2 or 3 cents. Not all Strings in Python are Unicode. Python has a StringType and a UnicodeType. If you want to get a unicode string you have to write u"my test" instead of "my test". But in principle: u"my test" = "my test".decode("utf-8"). <-- depends on source encoding As has already been suggested, you should not depend on the default encoding of the operating system, so better use sys.getdefaultencoding() and store the encoding for communication with the console etc. (also important for wxwindows in non-unicode mode) Additionaly take care of the source encoding of your files, by adding a specific header to them: See: http://www.python.org/peps/pep-0263.html Finally I recommed the following tutorial, as the reportlab guys really know their stuff. http://www.reportlab.com/i18n/python_unicode_tutorial.html Kind Regards Jan Ischebeck ------------------------------------------------------------------------------------ P3 GmbH - Ingenieurgesellschaft f?r Management und Organisation Jan Ischebeck Senior Consultant N?rtinger Stra?e 9 70794 Filderstadt-Bernhausen phone: +49 - (0)163 / 75 33 613 fax: +49 - (0)163 / 99 75 33 613 e-mail: jan.ischebeck at p3-gmbh.de web: www.p3-gmbh.de -----Urspr?ngliche Nachricht----- Von: pythonce-bounces at python.org im Auftrag von Fuzzyman Gesendet: Do 02-Mrz-06 18:35 Cc: pythonce at python.org Betreff: Re: [PythonCE] Unicode default encoding Jeffrey Barish wrote: >>Luke Dunstan wrote: >> >> >>>----- Original Message ----- >>>From: "Jeffrey Barish" >>>To: >>>Sent: Friday, February 24, 2006 11:03 AM >>>Subject: [PythonCE] Unicode default encoding >>> >>> >>> >>>>What is the correct way to set PythonCE's default Unicode encoding? My >>>>reading (Python in a Nutshell) indicates that I am supposed to make a >>>>change to site.py, but there doesn't seem to be a site.py in >>>>PythonCE. (The closest I came is a site.pyc in python23.zip.) Nutshell >>>>suggests that in desperation one could put the following at the start of >>>>the main script: >>>> >>>>import sys >>>>reload(sys) >>>>sys.setdefaultencoding('iso-8859-15') >>>>del sys.setdefaultencoding >>>> >>>>This code solved the problem I was having reading and processing text that >>>>contains Unicode characters, but I am uncomfortable leaving a desperation >>>>solution in place. >>>> >>>> >>>> >>>I don't think modifying site.py would be a good solution, because if you >>>upgrade or reinstall python then the script will be overwritten. If you >>>only want to run your program on your own system then a better solution is >>>to create a file sitecustomize.py in your Python\Lib directory containing >>>this: >>> >>>import sys >>>sys.setdefaultencoding('iso-8859-15') >>> >>>If you want to distribute your program to other people though, you can't >>>expect them to change their default encoding so it is better not to rely on >>>the default encoding at all. >>> >>> >>> >>> >>Yep, using unicode and explicitly encoding/decoding is a better approach. >> >>Fuzzyman >> >> > >Once again, I am forced to display my ignorance. Sorry guys. I really don't >know much about Unicode. The solution that Luke suggested (sitecustomize.py >in my Python\Lib directory) works fine for me, but I am concerned about the >suggestion from him and Fuzzyman that explicit encoding/decoding is a better >approach. What is explicit encoding/decoding? Can someone point me to a >good resource for learning how to deal with Unicode correctly? > > Unicode, and text encodings in general, is a bit of a learning curve. Once you get your head round it, Python makes it pretty straightforward. Simple rules : * In Python text *really* means a unicode string * Because ordinary strings are really just strings of bytes * If you know the encoding, decode it to turn it into encoding * When writing or printing, encode it to turn it back into bytes * If you don't know the encoding then you better pray that whatever it is is encoded in the system default. ;-) byte_string = open(filename).read() # read a file text = byte_string.decode('utf_8') # we know it is UTF8, so we decode to unicode # ....code that uses the text byte_string = text.encode('utf_8') # we encode it back to UTF8 open(filename, 'w').write(byte_string) # so we can write it back out Decoding turns a byte string into a unicode object. Encoding turns a unicode object into a byte string. If this still confuses you (which it probably does) then there are lots of good resources. I happen to like : http://www.pyzine.com/Issue008/Section_Articles/article_Encodings.html Which seems to be down at the moment. :-( All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From fuzzyman at voidspace.org.uk Thu Mar 2 11:42:35 2006 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Thu, 02 Mar 2006 10:42:35 +0000 Subject: [PythonCE] Unicode default encoding In-Reply-To: References: <200603011946.50366.jeff_barish@earthlink.net> <4406BC5E.50501@voidspace.org.uk> Message-ID: <4406CC1B.5010703@voidspace.org.uk> Ischebeck, Jan wrote: >Just to add my 2 or 3 cents. > >Not all Strings in Python are Unicode. > > > Sure, but if you want to be certain that you are handling characters correctly you either *ought* to use unicode or be certain that your 'text' is either ascii or in the encoding of any streams you use. Note that the system default encoding (sys.stdout) is separate from (and usually different to) the Python default encoding. On a normal windows platform the *system* default will usually be cp1250 or cp850. For a *very* good introduction to unicode in general, read : http://www.joelonsoftware.com/articles/Unicode.html "The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)" >Python has a StringType and a UnicodeType. >If you want to get a unicode string you have to write u"my test" instead of "my test". >But in principle: u"my test" = "my test".decode("utf-8"). <-- depends on source encoding > > > That's for using unicode string literals within your source code. To get a unicode string from an 'external source' (i.e. a file) you use the string decode method and supply the encoding. If you aren't certain of the encoding, you might find the following (on guessing encodings) useful : http://www.voidspace.org.uk/python/articles/guessing_encoding.shtml >As has already been suggested, you should not depend on the default encoding of the >operating system, so better use sys.getdefaultencoding() and store the encoding for >communication with the console etc. (also important for wxwindows in non-unicode mode) > >Additionaly take care of the source encoding of your files, by adding a specific header to them: >See: http://www.python.org/peps/pep-0263.html > >Finally I recommed the following tutorial, as the reportlab guys really know their stuff. >http://www.reportlab.com/i18n/python_unicode_tutorial.html > > > Cool. There are lots of good resources and it's a subject well worth getting your head round the basics. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >Kind Regards > >Jan Ischebeck > >------------------------------------------------------------------------------------ > >P3 GmbH - Ingenieurgesellschaft f?r Management und Organisation > >Jan Ischebeck >Senior Consultant > >N?rtinger Stra?e 9 >70794 Filderstadt-Bernhausen > >phone: +49 - (0)163 / 75 33 613 >fax: +49 - (0)163 / 99 75 33 613 >e-mail: jan.ischebeck at p3-gmbh.de >web: www.p3-gmbh.de > > > >-----Urspr?ngliche Nachricht----- >Von: pythonce-bounces at python.org im Auftrag von Fuzzyman >Gesendet: Do 02-Mrz-06 18:35 >Cc: pythonce at python.org >Betreff: Re: [PythonCE] Unicode default encoding > >Jeffrey Barish wrote: > > > >>>Luke Dunstan wrote: >>> >>> >>> >>> >>>>----- Original Message ----- >>>>From: "Jeffrey Barish" >>>>To: >>>>Sent: Friday, February 24, 2006 11:03 AM >>>>Subject: [PythonCE] Unicode default encoding >>>> >>>> >>>> >>>> >>>> >>>>>What is the correct way to set PythonCE's default Unicode encoding? My >>>>>reading (Python in a Nutshell) indicates that I am supposed to make a >>>>>change to site.py, but there doesn't seem to be a site.py in >>>>>PythonCE. (The closest I came is a site.pyc in python23.zip.) Nutshell >>>>>suggests that in desperation one could put the following at the start of >>>>>the main script: >>>>> >>>>>import sys >>>>>reload(sys) >>>>>sys.setdefaultencoding('iso-8859-15') >>>>>del sys.setdefaultencoding >>>>> >>>>>This code solved the problem I was having reading and processing text that >>>>>contains Unicode characters, but I am uncomfortable leaving a desperation >>>>>solution in place. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>I don't think modifying site.py would be a good solution, because if you >>>>upgrade or reinstall python then the script will be overwritten. If you >>>>only want to run your program on your own system then a better solution is >>>>to create a file sitecustomize.py in your Python\Lib directory containing >>>>this: >>>> >>>>import sys >>>>sys.setdefaultencoding('iso-8859-15') >>>> >>>>If you want to distribute your program to other people though, you can't >>>>expect them to change their default encoding so it is better not to rely on >>>>the default encoding at all. >>>> >>>> >>>> >>>> >>>> >>>> >>>Yep, using unicode and explicitly encoding/decoding is a better approach. >>> >>>Fuzzyman >>> >>> >>> >>> >>Once again, I am forced to display my ignorance. Sorry guys. I really don't >>know much about Unicode. The solution that Luke suggested (sitecustomize.py >>in my Python\Lib directory) works fine for me, but I am concerned about the >>suggestion from him and Fuzzyman that explicit encoding/decoding is a better >>approach. What is explicit encoding/decoding? Can someone point me to a >>good resource for learning how to deal with Unicode correctly? >> >> >> >> >Unicode, and text encodings in general, is a bit of a learning curve. >Once you get your head round it, Python makes it pretty straightforward. > >Simple rules : > >* In Python text *really* means a unicode string >* Because ordinary strings are really just strings of bytes >* If you know the encoding, decode it to turn it into encoding >* When writing or printing, encode it to turn it back into bytes >* If you don't know the encoding then you better pray that whatever it >is is encoded in the system default. ;-) > >byte_string = open(filename).read() # read a file >text = byte_string.decode('utf_8') # we know it is UTF8, so we decode >to unicode ># ....code that uses the text >byte_string = text.encode('utf_8') # we encode it back to UTF8 >open(filename, 'w').write(byte_string) # so we can write it back out > >Decoding turns a byte string into a unicode object. >Encoding turns a unicode object into a byte string. > >If this still confuses you (which it probably does) then there are lots >of good resources. I happen to like : > > http://www.pyzine.com/Issue008/Section_Articles/article_Encodings.html > >Which seems to be down at the moment. :-( > >All the best, > >Fuzzyman >http://www.voidspace.org.uk/python/index.shtml >_______________________________________________ >PythonCE mailing list >PythonCE at python.org >http://mail.python.org/mailman/listinfo/pythonce > > > >_______________________________________________ >PythonCE mailing list >PythonCE at python.org >http://mail.python.org/mailman/listinfo/pythonce > > > From coder_infidel at hotmail.com Thu Mar 2 11:42:46 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Thu, 2 Mar 2006 18:42:46 +0800 Subject: [PythonCE] Warning about comctl32.dll References: <200603012027.42031.jeff_barish@earthlink.net> Message-ID: ----- Original Message ----- From: "Jeffrey Barish" To: Sent: Thursday, March 02, 2006 11:27 AM Subject: Re: [PythonCE] Warning about comctl32.dll >> > Some of my applications are now triggering a warning when they first >> > start >> > running that reads: >> > >> > Please install a newer version of comctl32.dll (at least version 4.70 >> > is >> > required but you have 0.00) or the program won't operate correctly. >> >> If I search for this message on Google it appears only in wxWidgets >> source >> code, so I suggest you ask on their mailing list. >> >> Luke > > I did post a message, as you suggested. In case anyone is interested, the > response that I got was: > >> It seems in 2_6_BRANCH of wxWidgets source repository this message occur >> in >> wxW/src/msw/listctrl.cpp when wxLC_VIRTUAL flag is used. > > The version of wx that runs on WinCE is 2.5.2.8u, but the symptoms match. > All > my test programs that contain a list control in virtual mode produce the > error message and those with a list control in normal mode do not. I am > still searching for a solution to this problem. > -- > Jeffrey Barish Did they admit that it is a wxWidgets bug though? As you say, Windows CE has no comctl32.dll so wxWidgets should probably not check for the version number, but I don't know for sure. The only way to avoid it would be to modify and recompile wxWidgets for WinCE. Luke From coder_infidel at hotmail.com Thu Mar 2 11:54:31 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Thu, 2 Mar 2006 18:54:31 +0800 Subject: [PythonCE] =?iso-8859-1?q?Running_Python_program_without_getting_?= =?iso-8859-1?q?Python_CE=A0window?= References: <200603011935.05301.jeff_barish@earthlink.net> Message-ID: The normal .py association on Windows is done with a couple of registry values: 1. Create a key: HKEY_CLASSES_ROOT\.py 2. Set the default value of this key to: Python.File 3. Create a key: HKEY_CLASSES_ROOT\Python.File\shell\open\command 4. Set the default value to: "C:\Python24\python.exe" "%1" %* Windows CE is the same but the command might be: "\Program Files\PythonCE\python.exe" "%1" You could make .pyw work on WinCE by creating a key HKCR\.pyw and another like HKCR\Python.File.NoShell, with the appropriate command line. In fact I may do this in the next version of the PythonCE installer. There are several ways to edit the registry. I've used two: 1. Total Commander, a free file manager for WinCE that includes a registry editor 2. Remote Registry Editor from MS eMbedded Visual C++ I've also used this command line console: http://www.symbolictools.de/public/pocketconsole/ Luke ----- Original Message ----- From: "Jeffrey Barish" To: Sent: Thursday, March 02, 2006 10:35 AM Subject: [PythonCE] Running Python program without getting Python CE window ----- Original Message ----- From: "Jeffrey Barish" To: Sent: Friday, February 24, 2006 11:08 AM Subject: [PythonCE] Running Python program without getting Python CE window > > Whenever I run a Python application, I get a window titled "Python CE" that > > seems to capture stdout. Is it called the console? I would like to run my > > application without getting that window. I had the impression that this > > window would not appear if I ran the application using pythonw. To that > > end, I changed the first line of my application to > > > > #! /usr/bin/env pythonw > > > > (instead of /usr/bin/env/python). Changing this line has no effect in > > either CE or XP. What is the correct procedure? > > As somebody else mentioned, that is a Unix-specific feature. In Windows XP > you can rename the file to .pyw to run it automatically with pythonw.exe. > On > Windows CE there is no standard way but this might help: > > python /nopcceshell program.py > > Luke Forgive my continued ignorance. Changing the extension works fine in XP to suppress the console window, but I don't understand how to enter the command you suggested in CE. Did you find a console for CE that permits you to type in commands? Does CE come with one (that I have been unable to locate)? I also posted a related question last week, but I never saw my message in the digest (which happens frequently). I am also wondering what the procedure is for attaching an icon to my application so that I can run the application by tapping the icon? And, to be precise, what I would like is to run my Python program in such a way that the console window does not appear. Perhaps tapping the icon would run the command that you suggested above. -- Jeffrey Barish _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From kitsune_e at yahoo.com Thu Mar 2 19:21:40 2006 From: kitsune_e at yahoo.com (Ed Blake) Date: Thu, 2 Mar 2006 10:21:40 -0800 (PST) Subject: [PythonCE] Running Python program without getting Python CE window In-Reply-To: Message-ID: <20060302182140.44711.qmail@web50204.mail.yahoo.com> --- "Michael Foord" wrote: > You ought to check out Wax. It's a friendly Pythonic layer that sits > atop of wx and IMHO is just as easy to use as Tkinter. Lol! I've been using/tinkering with firedrop for a few weeks now so I am vaguely familier with wax. I don't really like the idea of using a largish wrapper over the top of a huge library though, especially on a small embedded device! Also wax is incomplete, and as I've said I don't know enough Wx to fix/add stuff. BTW in Firedrop my page template was failing because the editor I was using inserted tabs instead of spaces. I didn't really feel like fixing my template so I poked around in embedded_code.py. If you add ".replace('\t',' ')" to the return statement in replace_separators tabs vs. spaces becomes a non-issue ^_^ --- Luke Dunstan wrote: > > > You could make .pyw work on WinCE by creating a key HKCR\.pyw and another > like HKCR\Python.File.NoShell, with the appropriate command line. In fact I > > may do this in the next version of the PythonCE installer. > ... Hope you don't mind, attached is my hacked version of setup-registry.py which registers ".pyw", and adds the PythonCE icon to all Python files! It can also be found here: http://kitsu.petesdomain.com/files/WinCE/setup-registry.py I haven't tested it yet! My ipaq is out of commission for a while because I needed its SD card -_- -------------- next part -------------- A non-text attachment was scrubbed... Name: setup-registry.py Type: text/x-python Size: 1666 bytes Desc: 30225755-setup-registry.py Url : http://mail.python.org/pipermail/pythonce/attachments/20060302/57c557bc/attachment.py From theller at python.net Thu Mar 2 19:34:28 2006 From: theller at python.net (Thomas Heller) Date: Thu, 02 Mar 2006 19:34:28 +0100 Subject: [PythonCE] Running Python program without getting Python CE window In-Reply-To: <20060302182140.44711.qmail@web50204.mail.yahoo.com> References: <20060302182140.44711.qmail@web50204.mail.yahoo.com> Message-ID: <44073AB4.1080600@python.net> Ed Blake wrote: > --- "Michael Foord" wrote: > >> You ought to check out Wax. It's a friendly Pythonic layer that sits >> atop of wx and IMHO is just as easy to use as Tkinter. > > Lol! I've been using/tinkering with firedrop for a few weeks now so I am > vaguely familier with wax. I don't really like the idea of using a largish > wrapper over the top of a huge library though, especially on a small embedded > device! Also wax is incomplete, and as I've said I don't know enough Wx to > fix/add stuff. I've lost the original email, butI hope this is still on topic: Now that ctypes works on WindowsCE, someone should revive the venster project! http://venster.sourceforge.net/htdocs/ Thomas From kitsune_e at yahoo.com Thu Mar 2 19:57:18 2006 From: kitsune_e at yahoo.com (Ed Blake) Date: Thu, 2 Mar 2006 10:57:18 -0800 (PST) Subject: [PythonCE] Running Python program without getting Python CE window In-Reply-To: <44073AB4.1080600@python.net> Message-ID: <20060302185718.80609.qmail@web50207.mail.yahoo.com> --- Thomas Heller wrote: > > I've lost the original email, butI hope this is still on topic: > > Now that ctypes works on WindowsCE, someone should revive the venster > project! > > http://venster.sourceforge.net/htdocs/ > Very cool project, I've been thinking for a while that a Pythonic wrapper around Windows ui stuff would be very handy... but the inability to fix/extend goes double for microsoft stuff. It would be nice if there were good win32ui docs/tutorials/guides. It seems to wrap a lot of stuff, but I have next to zero knowledge concerning windows ui programming and the wrapping looks pretty raw! From TGalvin at geminidataloggers.com Mon Mar 6 12:23:48 2006 From: TGalvin at geminidataloggers.com (Tom Galvin) Date: Mon, 6 Mar 2006 11:23:48 -0000 Subject: [PythonCE] wincerapi Message-ID: Hi I'm trying to build wincerapi.pyd using pywin32-207. I can see that a wincerapi.dsw exists but running python setup.py install doesn't generate the binary. Has anyone had any experience of success/failure in building this module they could share? Many thanks Tom ____________________ Important Notice: This email and any attachments are confidential and may contain trade secrets or be legally privileged. If you have received this email in error you must not use, rely upon, disclose, copy or distribute the contents. Please reply to the sender so that proper delivery can be arranged and delete the email from your computer. Gemini Data Loggers monitor incoming and outgoing email to ensure satisfactory customer service, maintain company security and prevent abuse of their email system. However, any views expressed in this email are not necessarily those of Gemini and Gemini cannot be held responsible for the content. Gemini makes best efforts to ensure emails are virus free; however you are advised to carry out your own checks. Gemini does not accept responsibility for any damage resulting from email viruses. ____________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060306/4efc61ea/attachment.htm From paul.grant at infineon.com Fri Mar 10 17:47:51 2006 From: paul.grant at infineon.com (PG2006) Date: Fri, 10 Mar 2006 08:47:51 -0800 (PST) Subject: [PythonCE] Build WxPython for wince Message-ID: <3342503.post@talk.nabble.com> Hi, I'm hoping someone can help me ! I'm trying to build wxpython for PocketPC. I've successfully compiled python 2.3.5, and I can compile wxwidgets 2.6.2 for wince, but I can't find any .vcw files within the wxpython-src-2.6.6.tar.gz tarball. I guess they must exist as many people seem to have built wxpython for wince. Can anyone hlpe ? Cheers PG -- View this message in context: http://www.nabble.com/Build-WxPython-for-wince-t1260083.html#a3342503 Sent from the Python - pythonce forum at Nabble.com. From jeff_barish at earthlink.net Sat Mar 11 16:43:54 2006 From: jeff_barish at earthlink.net (jeffbarish) Date: Sat, 11 Mar 2006 07:43:54 -0800 (PST) Subject: [PythonCE] Build WxPython for wince In-Reply-To: <3342503.post@talk.nabble.com> References: <3342503.post@talk.nabble.com> Message-ID: <3355508.post@talk.nabble.com> Brian Retford, author of the one WinCE build of wxPython I know about, provided diffs for his build to Robin Dunn, who intends to post them on starship. Perhaps they will help you in your quest. -- View this message in context: http://www.nabble.com/Build-WxPython-for-wince-t1260083.html#a3355508 Sent from the Python - pythonce forum at Nabble.com. From jeff_barish at earthlink.net Sun Mar 12 20:49:19 2006 From: jeff_barish at earthlink.net (jeffbarish) Date: Sun, 12 Mar 2006 11:49:19 -0800 (PST) Subject: [PythonCE] Using buttons on PDA Message-ID: <3367594.post@talk.nabble.com> Is there a way to change the way in which the buttons on the PDA interact with the program? I suspect that answering this question requires the information that I am using wxPython. Currently, the scroll button will permit me to change the selection of the current control, but I have not found a way to tab to a different control. I would like to control one listctrl using the button -- and only that control. It would also be nice if I could assign useful functions to the buttons that now open the calendar, mail, etc. -- View this message in context: http://www.nabble.com/Using-buttons-on-PDA-t1268894.html#a3367594 Sent from the Python - pythonce forum at Nabble.com. From mhammond at skippinet.com.au Mon Mar 13 11:50:50 2006 From: mhammond at skippinet.com.au (Mark Hammond) Date: Mon, 13 Mar 2006 21:50:50 +1100 Subject: [PythonCE] wincerapi In-Reply-To: Message-ID: Sadly, the lack of responses indicates this module is dead. I haven't personally tried to build it for a number of years, and well before I moved to a distutils based build system for pywin32. If you (or anyone) finds it of ongoing use, just let me know (and send me any patches you find necessary!) Cheers, Mark -----Original Message----- From: pythonce-bounces at python.org [mailto:pythonce-bounces at python.org]On Behalf Of Tom Galvin Sent: Monday, 6 March 2006 10:24 PM To: pythonce at python.org Subject: [PythonCE] wincerapi Hi I'm trying to build wincerapi.pyd using pywin32-207. I can see that a wincerapi.dsw exists but running python setup.py install doesn't generate the binary. Has anyone had any experience of success/failure in building this module they could share? Many thanks Tom ---------------------------------------------------------------------------- -- Important Notice: This email and any attachments are confidential and may contain trade secrets or be legally privileged. If you have received this email in error you must not use, rely upon, disclose, copy or distribute the contents. Please reply to the sender so that proper delivery can be arranged and delete the email from your computer. Gemini Data Loggers monitor incoming and outgoing email to ensure satisfactory customer service, maintain company security and prevent abuse of their email system. However, any views expressed in this email are not necessarily those of Gemini and Gemini cannot be held responsible for the content. Gemini makes best efforts to ensure emails are virus free; however you are advised to carry out your own checks. Gemini does not accept responsibility for any damage resulting from email viruses. ---------------------------------------------------------------------------- -- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060313/aef243f2/attachment.html From hybrid at tuxfamily.org Mon Mar 13 22:15:43 2006 From: hybrid at tuxfamily.org (Ali Sabil) Date: Mon, 13 Mar 2006 22:15:43 +0100 Subject: [PythonCE] Problem building PythonCE for x86 In-Reply-To: References: Message-ID: <4415E0FF.6030706@tuxfamily.org> hi all, I tried for the last days to build python CE for a real x86 windows CE 5.0 platform, i managed to change the makefiles, but actually it fails linking, and complains about multiple definitions of _DllMain : lib /OUT:binaries\X86Rel\pythoncore\python23_library.lib binaries\X86Rel\pythoncore\*.obj Microsoft (R) Library Manager Version 6.24.3077 Copyright (C) Microsoft Corporation. All rights reserved. link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma00468. python23_library.lib(dl_nt.obj) : error LNK2005: _DllMain already defined in corelibc.lib(dllmain.obj) python23_library.lib(dl_nt.obj) : warning LNK4006: _DllMain already defined in corelibc.lib(dllmain.obj); second definit ion ignored Creating library binaries\X86Rel\python23.lib and object binaries\X86Rel\python23.exp binaries\X86Rel\python23.dll : fatal error LNK1169: one or more multiply defined symbols found NMAKE : fatal error U1077: 'link.exe' : return code '0x491' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2' Stop. I edited the x86rel.mk as follow : PLATFORM_OUTDIR=X86Rel PLATFORM_INTDIR=X86Rel PLATFORM_CPP=cl.exe PLATFORM_CPP_PROJ=/D "i486" /D "_X86_" /D "x86" /D "NDEBUG" $(CFLAGS) /D WIN32_WCE_X86 /Gd /Oxs /LD /ML PLATFORM_LINK32_FLAGS=/subsystem:$(CESUBSYSTEM) /MACHINE:IX86 PLATFORM_LINK32_DLL_FLAGS=/base:"0x00100000" /entry:"_DllMainCRTStartup" coredll.lib corelibc.lib /nodefaultlib:oldnames.lib /nodefaultlib:libc.lib $(PLATFORM_LINK32_FLAGS) PLATFORM_RSCFLAGS=/d "_X86_" /d "x86" /d "i486" /r /d "NDEBUG" Thank you in advance. -- Ali SABIL From coder_infidel at hotmail.com Tue Mar 14 15:58:25 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Tue, 14 Mar 2006 22:58:25 +0800 Subject: [PythonCE] Problem building PythonCE for x86 References: <4415E0FF.6030706@tuxfamily.org> Message-ID: The problem appears to be that you added .lib files to PLATFORM_LINK32_DLL_FLAGS, and on the linker command line these appeared before the Python object files (they should be after). The fact that these lib files are not needed for the ARM build suggests that something else is wrong (I don't know what exactly). What happens without all those extra linker options you added? Luke ----- Original Message ----- From: "Ali Sabil" To: Sent: Tuesday, March 14, 2006 5:15 AM Subject: [PythonCE] Problem building PythonCE for x86 > hi all, > > I tried for the last days to build python CE for a real x86 windows CE > 5.0 platform, i managed to change the makefiles, but actually it fails > linking, and complains about multiple definitions of _DllMain : > > > lib /OUT:binaries\X86Rel\pythoncore\python23_library.lib > binaries\X86Rel\pythoncore\*.obj > Microsoft (R) Library Manager Version 6.24.3077 > Copyright (C) Microsoft Corporation. All rights reserved. > > link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma00468. > python23_library.lib(dl_nt.obj) : error LNK2005: _DllMain already > defined in corelibc.lib(dllmain.obj) > python23_library.lib(dl_nt.obj) : warning LNK4006: _DllMain already > defined in corelibc.lib(dllmain.obj); second definit > ion ignored > Creating library binaries\X86Rel\python23.lib and object > binaries\X86Rel\python23.exp > binaries\X86Rel\python23.dll : fatal error LNK1169: one or more multiply > defined symbols found > NMAKE : fatal error U1077: 'link.exe' : return code '0x491' > Stop. > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ > 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2' > Stop. > > > I edited the x86rel.mk as follow : > > PLATFORM_OUTDIR=X86Rel > PLATFORM_INTDIR=X86Rel > PLATFORM_CPP=cl.exe > PLATFORM_CPP_PROJ=/D "i486" /D "_X86_" /D "x86" /D "NDEBUG" $(CFLAGS) /D > WIN32_WCE_X86 /Gd /Oxs /LD /ML > PLATFORM_LINK32_FLAGS=/subsystem:$(CESUBSYSTEM) /MACHINE:IX86 > PLATFORM_LINK32_DLL_FLAGS=/base:"0x00100000" /entry:"_DllMainCRTStartup" > coredll.lib corelibc.lib /nodefaultlib:oldnames.lib > /nodefaultlib:libc.lib $(PLATFORM_LINK32_FLAGS) > PLATFORM_RSCFLAGS=/d "_X86_" /d "x86" /d "i486" /r /d "NDEBUG" > > Thank you in advance. > > -- > Ali SABIL > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > From coder_infidel at hotmail.com Wed Mar 15 16:13:17 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Wed, 15 Mar 2006 23:13:17 +0800 Subject: [PythonCE] Problem building PythonCE for x86 References: <4415E0FF.6030706@tuxfamily.org> <44173D15.5000501@tuxfamily.org> Message-ID: No, the python shell provided with PythonCE is a GUI only program so you would have to use a different shell, perhaps the default console shell that is used on desktop Windows. Luke ----- Original Message ----- From: Ali Sabil To: Luke Dunstan Sent: Wednesday, March 15, 2006 6:00 AM Subject: Re: [PythonCE] Problem building PythonCE for x86 I managed to get the dll to build using this : /defaultlib:coredll.lib /defaultlib:corelibc.lib /nodefaultlib:oldnames.lib /nodefaultlib:libc.lib But now i cannot build python.exe because of this : Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Building pythoncore Building python link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma01216. python.obj : error LNK2019: unresolved external symbol _SipGetInfo referenced in function _PCCESHELL_Window_Thread binaries\X86Rel\python.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: 'link.exe' : return code '0x460' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2' Stop. I guess this is related to the fact i don't build gui support with platform builder ... what i wanted to know, is that if it was possible to build python.exe without gui support ??? As it's useless in my case . thank you very much -- Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060315/def6bb3b/attachment.htm From coder_infidel at hotmail.com Wed Mar 15 17:28:51 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Thu, 16 Mar 2006 00:28:51 +0800 Subject: [PythonCE] Using buttons on PDA References: <3367594.post@talk.nabble.com> Message-ID: I believe the scroll button can be handled like any other keyboard event as VK_UP / VK_DOWN keys. I'm not sure about the program keys, but I think RegisterHotKey() is related. I am speaking from a WinCE API point of view so I'm not sure how this translates to wxPython. Luke ----- Original Message ----- From: "jeffbarish" To: Sent: Monday, March 13, 2006 3:49 AM Subject: [PythonCE] Using buttons on PDA > > Is there a way to change the way in which the buttons on the PDA interact > with the program? I suspect that answering this question requires the > information that I am using wxPython. Currently, the scroll button will > permit me to change the selection of the current control, but I have not > found a way to tab to a different control. I would like to control one > listctrl using the button -- and only that control. It would also be nice > if I could assign useful functions to the buttons that now open the > calendar, mail, etc. > -- From jeff_barish at earthlink.net Mon Mar 20 16:01:50 2006 From: jeff_barish at earthlink.net (jeffbarish) Date: Mon, 20 Mar 2006 07:01:50 -0800 (PST) Subject: [PythonCE] Using buttons on PDA In-Reply-To: References: <3367594.post@talk.nabble.com> Message-ID: <3494819.post@talk.nabble.com> Yes indeed. To be precise, I found that the rocker button on my Dell Axim X51v triggers 5 wxPython events: WXK_LEFT, WXK_RIGHT, WXK_UP, WXK_DOWN, and WXK_RETURN. I have not detected any wxPython events when I push the program keys, so I suspect that they are dealt with by winCE before getting to wxPython. Thanks for the suggestion. -- View this message in context: http://www.nabble.com/Using-buttons-on-PDA-t1268894.html#a3494819 Sent from the Python - pythonce forum at Nabble.com. From aladin at junipersys.com Mon Mar 20 20:42:56 2006 From: aladin at junipersys.com (Aladin Sidahmed) Date: Mon, 20 Mar 2006 12:42:56 -0700 Subject: [PythonCE] Building win32com on windows CE Message-ID: <002c01c64c56$7f50fbb0$3900a8c0@jsihome.com> I was able to build both python on and windows extension packages for windows CE using the make file command of nmake all, but the build didn;'t include the COM (win32com) packages, and I am not sure why it didn't or how to do it. So I appreciate any kind of help at this moment. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060320/e3127f16/attachment.html From aladin at junipersys.com Mon Mar 20 20:32:31 2006 From: aladin at junipersys.com (Aladin Sidahmed) Date: Mon, 20 Mar 2006 12:32:31 -0700 Subject: [PythonCE] Post Request Message-ID: <001e01c64c55$0b28eb40$3900a8c0@jsihome.com> aladin at junipersys.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060320/e9bb6b96/attachment.htm From aladin at junipersys.com Mon Mar 20 22:29:09 2006 From: aladin at junipersys.com (Aladin Sidahmed) Date: Mon, 20 Mar 2006 14:29:09 -0700 Subject: [PythonCE] Getting the win32 extensions working Message-ID: <006301c64c65$593ebed0$3900a8c0@jsihome.com> Did you manage to get the win32com build for CE? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060320/c9d38fb0/attachment.html From coder_infidel at hotmail.com Tue Mar 21 15:17:34 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Tue, 21 Mar 2006 22:17:34 +0800 Subject: [PythonCE] Building win32com on windows CE References: <002c01c64c56$7f50fbb0$3900a8c0@jsihome.com> Message-ID: The reason why is because, as far as I know, nobody has actually done the work to port win32com to WinCE and provide a makefile. If comtypes can do what you want then I would recommend trying that instead because, being written in Python, it is more portable and easier to modify and test. Luke ----- Original Message ----- From: Aladin Sidahmed To: pythonce at python.org Sent: Tuesday, March 21, 2006 3:42 AM Subject: [PythonCE] Building win32com on windows CE I was able to build both python on and windows extension packages for windows CE using the make file command of nmake all, but the build didn;'t include the COM (win32com) packages, and I am not sure why it didn't or how to do it. So I appreciate any kind of help at this moment. Thanks ------------------------------------------------------------------------------ _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060321/d588cd8e/attachment.htm From aladin at junipersys.com Tue Mar 21 19:21:02 2006 From: aladin at junipersys.com (Aladin Sidahmed) Date: Tue, 21 Mar 2006 11:21:02 -0700 Subject: [PythonCE] Building win32com on windows CE Message-ID: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> Alright, I managed to get the ctypes module installed on the winCE device, but I can't find the source or a WinCE build for the comtypes. I tried to use the same win32 package on Sourceforge but that was just a pain and led to no where. Thanks Aladin >The reason why is because, as far as I know, nobody has actually done the work to port win32com to WinCE and provide a makefile. If comtypes can do what >you want then I would recommend trying that instead because, being written in Python, it is more portable and easier to modify and test. > >Luke From alan at goatpunch.com Wed Mar 22 06:46:21 2006 From: alan at goatpunch.com (Alan Davies) Date: Wed, 22 Mar 2006 00:46:21 -0500 Subject: [PythonCE] Python CE on Windows Mobile 5 In-Reply-To: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> References: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> Message-ID: <1143006381.3405.257221969@webmail.messagingengine.com> Hi, Has anyone managed to succesfully run Python CE on Windows Mobile 5? I checked in the archives but couldn't find any references to WM5. If a WM5-compatible build doesn't exist, how could I go about creating one myself? thanks, --Alan From andy at andybak.net Wed Mar 22 11:06:07 2006 From: andy at andybak.net (Andy Baker) Date: Wed, 22 Mar 2006 10:06:07 +0000 Subject: [PythonCE] Python CE on Windows Mobile 5 In-Reply-To: <1143006381.3405.257221969@webmail.messagingengine.com> References: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> <1143006381.3405.257221969@webmail.messagingengine.com> Message-ID: <85d9ccbb0603220206u581af064te8aa9d7372dd7ede@mail.gmail.com> Works for me. Haven't used it much yet but the basics are working. On 3/22/06, Alan Davies wrote: > > Hi, > > Has anyone managed to succesfully run Python CE on Windows Mobile 5? I > checked in the archives but couldn't find any references to WM5. If a > WM5-compatible build doesn't exist, how could I go about creating one > myself? > > thanks, > > --Alan > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > -- ---------------------------------- http://www.andybak.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060322/21b0cfbd/attachment.html From jeff_barish at earthlink.net Wed Mar 22 16:11:40 2006 From: jeff_barish at earthlink.net (jeffbarish) Date: Wed, 22 Mar 2006 07:11:40 -0800 (PST) Subject: [PythonCE] Python CE on Windows Mobile 5 In-Reply-To: <85d9ccbb0603220206u581af064te8aa9d7372dd7ede@mail.gmail.com> References: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> <1143006381.3405.257221969@webmail.messagingengine.com> <85d9ccbb0603220206u581af064te8aa9d7372dd7ede@mail.gmail.com> Message-ID: <3534108.post@talk.nabble.com> I've been using Python on Windows Mobile 5 for a couple months. I have encountered only two problems, neither directly related to Python. (1) I haven't been able to find a console that works on Mobile 5. PocketConsole (http://www.symbolictools.de/public/pocketconsole/) works only on Mobile 2002. (2) wxPython produces a bogus warning about comctrl32.dll if you use a list control in virtual mode. Other than that, everything I have done with Python has worked. I was particularly pleased to see that Pyro works on PythonCE. -- View this message in context: http://www.nabble.com/Building-win32com-on-windows-CE-t1319151.html#a3534108 Sent from the Python - pythonce forum at Nabble.com. From coder_infidel at hotmail.com Wed Mar 22 16:13:57 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Wed, 22 Mar 2006 23:13:57 +0800 Subject: [PythonCE] Building win32com on windows CE References: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> Message-ID: What do you mean by "just a pain and led to nowhere"? I'm also not sure what you mean by a "WinCE build" of comtypes because the library is written in Python and there is nothing to "build". If you are figuring out how to use comtypes I highly recommend learning on desktop Windows first because it will be faster to develop and there are a lot more things you can do with COM than on WinCE. Luke ----- Original Message ----- From: "Aladin Sidahmed" To: Sent: Wednesday, March 22, 2006 2:21 AM Subject: [PythonCE] Building win32com on windows CE > Alright, I managed to get the ctypes module installed on the winCE device, > but I can't find the source or a WinCE build for the comtypes. I tried to > use the same win32 package on Sourceforge but that was just a pain and led > to no where. > > Thanks > > Aladin > >>The reason why is because, as far as I know, nobody has actually done the > work to port win32com to WinCE and provide a makefile. If comtypes can do > what >you want then I would recommend trying that instead because, being > written in Python, it is more portable and easier to modify and test. >> >>Luke > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > From aladin at junipersys.com Tue Mar 28 00:05:47 2006 From: aladin at junipersys.com (Aladin Sidahmed) Date: Mon, 27 Mar 2006 15:05:47 -0700 Subject: [PythonCE] Displaying an MFC COM object using comtypes Message-ID: <000b01c651ea$9a63d9b0$3900a8c0@jsihome.com> In my ATL Class, I have a function with the body STDMETHODIMP CSimpleObj::Show() { AFX_MANAGE_STATE(AfxGetStaticModuleState()) // TODO: Add your implementation code here CSimpleDialog myDialog; int result = myDialog.DoModal(); MessageBox(NULL,TEXT("Live From Python"), TEXT("MFC ATL COM"), MB_OK); return S_OK; } and python script is very simple from comtypes.client import CreateObject MFC = CreateObject("MFCATLCom.SimpleObj.1") MFC.Show( ) if does return a success message, but niether the Dialog nor the Message box appears. Does any one know what's going on? -Aladin *BTW Thanks to Luke Dunstan for helping me out with getting PythonCE and comtypes running. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060327/42b531eb/attachment.html From TGalvin at geminidataloggers.com Wed Mar 29 13:16:24 2006 From: TGalvin at geminidataloggers.com (Tom Galvin) Date: Wed, 29 Mar 2006 12:16:24 +0100 Subject: [PythonCE] Displaying an MFC COM object using comtypes Message-ID: I have been having difficulties calling an MFC dll from python and found this post useful. http://groups.google.com/group/microsoft.public.windowsce.platbuilder/ms g/8c38be02059bb286?dmode=source -----Original Message----- From: pythonce-bounces at python.org [mailto:pythonce-bounces at python.org] On Behalf Of pythonce-request at python.org Sent: 28 March 2006 11:00 To: pythonce at python.org Subject: PythonCE Digest, Vol 32, Issue 14 Send PythonCE mailing list submissions to pythonce at python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/pythonce or, via email, send a message with subject or body 'help' to pythonce-request at python.org You can reach the person managing the list at pythonce-owner at python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of PythonCE digest..." Today's Topics: 1. Displaying an MFC COM object using comtypes (Aladin Sidahmed) ---------------------------------------------------------------------- Message: 1 Date: Mon, 27 Mar 2006 15:05:47 -0700 From: "Aladin Sidahmed" Subject: [PythonCE] Displaying an MFC COM object using comtypes To: Message-ID: <000b01c651ea$9a63d9b0$3900a8c0 at jsihome.com> Content-Type: text/plain; charset="iso-8859-1" In my ATL Class, I have a function with the body STDMETHODIMP CSimpleObj::Show() { AFX_MANAGE_STATE(AfxGetStaticModuleState()) // TODO: Add your implementation code here CSimpleDialog myDialog; int result = myDialog.DoModal(); MessageBox(NULL,TEXT("Live From Python"), TEXT("MFC ATL COM"), MB_OK); return S_OK; } and python script is very simple from comtypes.client import CreateObject MFC = CreateObject("MFCATLCom.SimpleObj.1") MFC.Show( ) if does return a success message, but niether the Dialog nor the Message box appears. Does any one know what's going on? -Aladin *BTW Thanks to Luke Dunstan for helping me out with getting PythonCE and comtypes running. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060327/42b531eb/ attachment-0001.html ------------------------------ _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce End of PythonCE Digest, Vol 32, Issue 14 **************************************** ____________________ Important Notice: This email and any attachments are confidential and may contain trade secrets or be legally privileged. If you have received this email in error you must not use, rely upon, disclose, copy or distribute the contents. Please reply to the sender so that proper delivery can be arranged and delete the email from your computer. Gemini Data Loggers monitor incoming and outgoing email to ensure satisfactory customer service, maintain company security and prevent abuse of their email system. However, any views expressed in this email are not necessarily those of Gemini and Gemini cannot be held responsible for the content. Gemini makes best efforts to ensure emails are virus free; however you are advised to carry out your own checks. Gemini does not accept responsibility for any damage resulting from email viruses. ____________________