From ahmad at newhive.com Thu Jun 1 19:59:19 2006 From: ahmad at newhive.com (ahmad adel rldardiry) Date: Thu, 1 Jun 2006 20:59:19 +0300 Subject: [PythonCE] py2exe Message-ID: <000b01c685a5$1c2877b0$1b01a8c0@ahmad> May peace and Allah Mercy and Blessings be upon you, Could this be done? A py2exe version for pocketpc, that generates an executable that can run on Pocket PC? Thanks There is no god but Allah Ahmad http://www.shagarah.com http://www.newhive.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060601/041503f0/attachment.htm From bkc at murkworks.com Fri Jun 2 01:58:58 2006 From: bkc at murkworks.com (Brad Clements) Date: Thu, 01 Jun 2006 19:58:58 -0400 Subject: [PythonCE] py2exe In-Reply-To: <000b01c685a5$1c2877b0$1b01a8c0@ahmad> Message-ID: <447F4702.12882.BEE85552@bkc.murkworks.com> On 1 Jun 2006 at 20:59, ahmad adel rldardiry wrote: > Could this be done? A py2exe version for pocketpc, that generates an > executable that can run on Pocket PC? py2exe requires ctypes. I think there was some progress getting ctypes to work on Windows CE. However you'd still need a linker for ARM and pre-made DLLs, plus figure out if the .zip'd python scripts can be appended to a Windows CE executable (that's the trick py2exe uses to bundle everything up on X86 platforms) So .. ctypes for windows ce needed first, then figure out how to append arbitrary data to an ARM executable on CE. -- Brad Clements, bkc at murkworks.com (315)268-1000 http://www.murkworks.com AOL-IM or SKYPE: BKClements From coder_infidel at hotmail.com Fri Jun 2 08:28:01 2006 From: coder_infidel at hotmail.com ( Luke Dunstan) Date: Fri, 2 Jun 2006 14:28:01 +0800 Subject: [PythonCE] py2exe References: <447F4702.12882.BEE85552@bkc.murkworks.com> Message-ID: ----- Original Message ----- From: "Brad Clements" To: Sent: Friday, June 02, 2006 7:58 AM Subject: Re: [PythonCE] py2exe > On 1 Jun 2006 at 20:59, ahmad adel rldardiry wrote: > >> Could this be done? A py2exe version for pocketpc, that generates an >> executable that can run on Pocket PC? > > py2exe requires ctypes. I think there was some progress getting ctypes to > work > on Windows CE. Actually I ported ctypes months ago, and since then both Thomas Heller and I have released ctypes binaries for versions of PythonCE. > > However you'd still need a linker for ARM and pre-made DLLs, plus figure > out if > the .zip'd python scripts can be appended to a Windows CE executable > (that's the > trick py2exe uses to bundle everything up on X86 platforms) Yes, that may be the tricky part I think, but I have not looked into it. Luke From theller at python.net Fri Jun 2 08:41:42 2006 From: theller at python.net (Thomas Heller) Date: Fri, 02 Jun 2006 08:41:42 +0200 Subject: [PythonCE] py2exe In-Reply-To: References: <447F4702.12882.BEE85552@bkc.murkworks.com> Message-ID: <447FDDA6.4050803@python.net> Luke Dunstan wrote: > ----- Original Message ----- > From: "Brad Clements" > To: > Sent: Friday, June 02, 2006 7:58 AM > Subject: Re: [PythonCE] py2exe > > >> On 1 Jun 2006 at 20:59, ahmad adel rldardiry wrote: >> >>> Could this be done? A py2exe version for pocketpc, that generates an >>> executable that can run on Pocket PC? >> >> py2exe requires ctypes. I think there was some progress getting ctypes to >> work >> on Windows CE. No, py2exe does not require ctypes (AFAIK ;-). > Actually I ported ctypes months ago, and since then both Thomas Heller and I > have released ctypes binaries for versions of PythonCE. > >> >> However you'd still need a linker for ARM and pre-made DLLs, plus figure >> out if >> the .zip'd python scripts can be appended to a Windows CE executable >> (that's the >> trick py2exe uses to bundle everything up on X86 platforms) > > Yes, that may be the tricky part I think, but I have not looked into it. If that does not work or is not possible, one should still be able to build with a separate library.zip. Thomas From jeff_barish at earthlink.net Fri Jun 2 16:53:57 2006 From: jeff_barish at earthlink.net (jeffbarish) Date: Fri, 2 Jun 2006 07:53:57 -0700 (PDT) Subject: [PythonCE] Port wxPython to Windows Mobile 5 Message-ID: <4681124.post@talk.nabble.com> I posted this plea on comp.python.wxpython yesterday, but I want to be sure that everyone who might be able to help sees it. I am desperately interested in having a current port of wxPython to Windows Mobile -- to the point that I am willing to pay someone out of my own pocket to do it. I'm sure that there are people on this list capable of doing it. Is someone willing? -- View this message in context: http://www.nabble.com/Port-wxPython-to-Windows-Mobile-5-t1723174.html#a4681124 Sent from the Python - pythonce forum at Nabble.com. From bandung at skyesystems.com Thu Jun 8 08:42:15 2006 From: bandung at skyesystems.com (Bandung) Date: Wed, 7 Jun 2006 23:42:15 -0700 (PDT) Subject: [PythonCE] pyeditce is online! In-Reply-To: <8f654c1e0605180722o5e92a40ep203ef4bb1d0ace2a@mail.gmail.com> References: <8f654c1e0605180722o5e92a40ep203ef4bb1d0ace2a@mail.gmail.com> Message-ID: <4766979.post@talk.nabble.com> You may want to take a look at the SpecTix project for some layout ideas. The ide was written in tcl/tk. I like the way that it adds geometry widgets at the start of a new project. If you can port this to wm5, that would be the bomb. (it may even run as it). When I get my new mini SD card, I will take a wack at installing it myself. SpecTix -- View this message in context: http://www.nabble.com/Re%3A-pyeditce-is-online%21-t1643579.html#a4766979 Sent from the Python - pythonce forum at Nabble.com. From bandung at skyesystems.com Thu Jun 8 08:43:20 2006 From: bandung at skyesystems.com (Bandung) Date: Wed, 7 Jun 2006 23:43:20 -0700 (PDT) Subject: [PythonCE] Tk/Tcl Widgets In-Reply-To: <446CF4D8.8040505@voidspace.org.uk> References: <446CF4D8.8040505@voidspace.org.uk> Message-ID: <4766993.post@talk.nabble.com> This project also has some promise and is based upon tcl as well. SpecTix -- View this message in context: http://www.nabble.com/Tk-Tcl-Widgets-t1646602.html#a4766993 Sent from the Python - pythonce forum at Nabble.com. From svax at free.fr Mon Jun 12 05:55:16 2006 From: svax at free.fr (Stephane Vaxelaire) Date: Mon, 12 Jun 2006 07:55:16 +0400 Subject: [PythonCE] PythonCE + wxPyCE + pySqlite + sqlite3 Message-ID: <1150084516.448ce5a4de4f6@imp3-g19.free.fr> Hello, I read a lot of posts about those python software but found no link to precompiled versions anywhere except on a website with wxpyce_v2.zip. Has anyone compiled wxPython and pysqlite for a PPC with WM 2003 ? Any binary package would be greatly appreciated. Regards From coder_infidel at hotmail.com Sat Jun 17 13:14:01 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 17 Jun 2006 19:14:01 +0800 Subject: [PythonCE] PythonCE wiki Message-ID: Hi all, I have started a new wiki for PythonCE, because existing ones are too old and I don't have control over them as they are not hosted on SourceForge. http://pythonce.sourceforge.net/Wikka/HomePage Please note that I have written this front page initially as merely a list of *ideas* for what pages I think need to be written, but most of them are not even started yet. Feel free to write these suggested pages if you think you can, and I will try to write some too as time permits. I would like to keep the front page fairly short, so it should be refactored if it becomes too large, e.g. by moving the "getting started" links to a separate GettingStarted page. Luke Dunstan From gmc at serveisw3.net Sat Jun 17 13:48:18 2006 From: gmc at serveisw3.net (=?ISO-8859-1?Q?Gonzalo_Monz=F3n?=) Date: Sat, 17 Jun 2006 13:48:18 +0200 Subject: [PythonCE] PythonCE wiki In-Reply-To: References: Message-ID: <4493EC02.5010108@serveisw3.net> Good idea Luke!! Cheers, Gonzalo Luke Dunstan escribi?: >Hi all, > >I have started a new wiki for PythonCE, because existing ones are too old >and I don't have control over them as they are not hosted on SourceForge. > >http://pythonce.sourceforge.net/Wikka/HomePage > >Please note that I have written this front page initially as merely a list >of *ideas* for what pages I think need to be written, but most of them are >not even started yet. Feel free to write these suggested pages if you think >you can, and I will try to write some too as time permits. I would like to >keep the front page fairly short, so it should be refactored if it becomes >too large, e.g. by moving the "getting started" links to a separate >GettingStarted page. > >Luke Dunstan >_______________________________________________ >PythonCE mailing list >PythonCE at python.org >http://mail.python.org/mailman/listinfo/pythonce > > > From andy at andybak.net Mon Jun 19 11:41:08 2006 From: andy at andybak.net (Andy Baker) Date: Mon, 19 Jun 2006 10:41:08 +0100 Subject: [PythonCE] PythonCE wiki In-Reply-To: <4493EC02.5010108@serveisw3.net> References: <4493EC02.5010108@serveisw3.net> Message-ID: <85d9ccbb0606190241t4e3388d9q7ebc4efeb12f1afd@mail.gmail.com> I feel it would improve things if someone could start contacting the authors/maintainers of some of the out of date PythonCE stuff floating around and ask them if they could update/remove/point to current stuff. The first impressions you get when you google for PythonCE is that it is a project that isn't particularly current. It would be nice to try and get the main google hits looking a bit more loved. On 6/17/06, Gonzalo Monz?n wrote: > Good idea Luke!! > > Cheers, > Gonzalo > > Luke Dunstan escribi?: > > >Hi all, > > > >I have started a new wiki for PythonCE, because existing ones are too old > >and I don't have control over them as they are not hosted on SourceForge. > > > >http://pythonce.sourceforge.net/Wikka/HomePage > > > >Please note that I have written this front page initially as merely a list > >of *ideas* for what pages I think need to be written, but most of them are > >not even started yet. Feel free to write these suggested pages if you think > >you can, and I will try to write some too as time permits. I would like to > >keep the front page fairly short, so it should be refactored if it becomes > >too large, e.g. by moving the "getting started" links to a separate > >GettingStarted page. > > > >Luke Dunstan > >_______________________________________________ > >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 > -- ---------------------------------- http://www.andybak.net From bkc at murkworks.com Mon Jun 19 16:51:40 2006 From: bkc at murkworks.com (Brad Clements) Date: Mon, 19 Jun 2006 10:51:40 -0400 Subject: [PythonCE] PythonCE wiki In-Reply-To: <85d9ccbb0606190241t4e3388d9q7ebc4efeb12f1afd@mail.gmail.com> References: <4493EC02.5010108@serveisw3.net> Message-ID: <449681BC.17148.45D1E99E@bkc.murkworks.com> On 19 Jun 2006 at 10:41, Andy Baker wrote: > I feel it would improve things if someone could start contacting the > authors/maintainers of some of the out of date PythonCE stuff floating > around and ask them if they could update/remove/point to current > stuff. google for "python ce" puts the oold murkworks-hosted wiki 2nd in the results. How can I "share the google love" to capitalize on the old wiki moving the new- one up higher in the results? Do I just put in a link to the new site and say "go here"? -- Brad Clements, bkc at murkworks.com (315)268-1000 http://www.murkworks.com AOL-IM or SKYPE: BKClements From andy at andybak.net Mon Jun 19 16:59:33 2006 From: andy at andybak.net (Andy Baker) Date: Mon, 19 Jun 2006 15:59:33 +0100 Subject: [PythonCE] PythonCE wiki In-Reply-To: <449681BC.17148.45D1E99E@bkc.murkworks.com> References: <4493EC02.5010108@serveisw3.net> <85d9ccbb0606190241t4e3388d9q7ebc4efeb12f1afd@mail.gmail.com> <449681BC.17148.45D1E99E@bkc.murkworks.com> Message-ID: <85d9ccbb0606190759n7fbadb31qc382e47e051dfe3b@mail.gmail.com> I'd would say having a prominant link on your most highly ranked page wrapped in a H1 and mentioning Python CE in the actual link text would be a good move. On 6/19/06, Brad Clements wrote: > > On 19 Jun 2006 at 10:41, Andy Baker wrote: > > > I feel it would improve things if someone could start contacting the > > authors/maintainers of some of the out of date PythonCE stuff floating > > around and ask them if they could update/remove/point to current > > stuff. > > google for "python ce" puts the oold murkworks-hosted wiki 2nd in the > results. > > How can I "share the google love" to capitalize on the old wiki moving the > new- > one up higher in the results? > > Do I just put in a link to the new site and say "go here"? > > > -- > Brad Clements, bkc at murkworks.com (315)268-1000 > http://www.murkworks.com > AOL-IM or SKYPE: BKClements > > > _______________________________________________ > 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/20060619/bc102e27/attachment.htm From coder_infidel at hotmail.com Mon Jun 19 17:43:43 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Mon, 19 Jun 2006 23:43:43 +0800 Subject: [PythonCE] PythonCE wiki References: <4493EC02.5010108@serveisw3.net> <449681BC.17148.45D1E99E@bkc.murkworks.com> Message-ID: ----- Original Message ----- From: "Brad Clements" To: Sent: Monday, June 19, 2006 10:51 PM Subject: Re: [PythonCE] PythonCE wiki > On 19 Jun 2006 at 10:41, Andy Baker wrote: > >> I feel it would improve things if someone could start contacting the >> authors/maintainers of some of the out of date PythonCE stuff floating >> around and ask them if they could update/remove/point to current >> stuff. > > google for "python ce" puts the oold murkworks-hosted wiki 2nd in the > results. > > How can I "share the google love" to capitalize on the old wiki moving the > new- > one up higher in the results? > > Do I just put in a link to the new site and say "go here"? I think that would help, but anyway if I was looking for Python for Windows CE I would search for 'python "windows ce"', not pythonce or "python ce", unless I already knew of the project. Luke From coder_infidel at hotmail.com Mon Jun 19 17:49:53 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Mon, 19 Jun 2006 23:49:53 +0800 Subject: [PythonCE] PythonCE wiki References: <4493EC02.5010108@serveisw3.net> <85d9ccbb0606190241t4e3388d9q7ebc4efeb12f1afd@mail.gmail.com> Message-ID: Good idea. So far I've contacted David Kashtan and Mark Hammond to ask for links to the PythonCE project. Luke ----- Original Message ----- From: "Andy Baker" To: Sent: Monday, June 19, 2006 5:41 PM Subject: Re: [PythonCE] PythonCE wiki I feel it would improve things if someone could start contacting the authors/maintainers of some of the out of date PythonCE stuff floating around and ask them if they could update/remove/point to current stuff. The first impressions you get when you google for PythonCE is that it is a project that isn't particularly current. It would be nice to try and get the main google hits looking a bit more loved. On 6/17/06, Gonzalo Monz?n wrote: > Good idea Luke!! > > Cheers, > Gonzalo > > Luke Dunstan escribi?: > > >Hi all, > > > >I have started a new wiki for PythonCE, because existing ones are too old > >and I don't have control over them as they are not hosted on SourceForge. > > > >http://pythonce.sourceforge.net/Wikka/HomePage > > > >Please note that I have written this front page initially as merely a > >list > >of *ideas* for what pages I think need to be written, but most of them > >are > >not even started yet. Feel free to write these suggested pages if you > >think > >you can, and I will try to write some too as time permits. I would like > >to > >keep the front page fairly short, so it should be refactored if it > >becomes > >too large, e.g. by moving the "getting started" links to a separate > >GettingStarted page. > > > >Luke Dunstan > >_______________________________________________ > >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 > -- ---------------------------------- http://www.andybak.net _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From benjamin.mcbride at gmail.com Tue Jun 20 17:20:05 2006 From: benjamin.mcbride at gmail.com (Benjamin McBride) Date: Tue, 20 Jun 2006 10:20:05 -0500 Subject: [PythonCE] serial port access Message-ID: Hi All, I need to access the serial port for my PPC application. I have been unable to locate information on this. I'm using Python 2.4.3 and PPC 2003. Previously I've used pyserial, but it appears that pyserial does not work on Windows CE. Thanks for any suggestions, Ben McBride bdm7935 at ksu.edu From gmc at serveisw3.net Tue Jun 20 18:09:28 2006 From: gmc at serveisw3.net (=?ISO-8859-1?Q?Gonzalo_Monz=F3n?=) Date: Tue, 20 Jun 2006 18:09:28 +0200 Subject: [PythonCE] serial port access In-Reply-To: References: Message-ID: <44981DB8.4050502@serveisw3.net> Hi Benjamin, You can use ctypes for direct access to serial ports via windows apis (openfile, readfile, writefile...) Note that manufacturers can have specific implementations, even they must agree to PPC implementation, but you can found small differences. http://www.codeproject.com/system/simpleserialcomm.asp Regards, Gonzalo Benjamin McBride escribi?: > Hi All, > > I need to access the serial port for my PPC application. I have been > unable to locate information on this. I'm using Python 2.4.3 and PPC > 2003. Previously I've used pyserial, but it appears that pyserial does > not work on Windows CE. > > Thanks for any suggestions, > > Ben McBride > bdm7935 at ksu.edu >_______________________________________________ >PythonCE mailing list >PythonCE at python.org >http://mail.python.org/mailman/listinfo/pythonce > > > From benjamin.mcbride at gmail.com Tue Jun 20 22:11:34 2006 From: benjamin.mcbride at gmail.com (Benjamin McBride) Date: Tue, 20 Jun 2006 15:11:34 -0500 Subject: [PythonCE] serial port access In-Reply-To: <44981DB8.4050502@serveisw3.net> References: <44981DB8.4050502@serveisw3.net> Message-ID: I've got ctypes installed. However, I have not been able to find any examples of how I might use ctypes for serial port access. Any suggestions would be appreciated. Thanks, Ben On 6/20/06, Gonzalo Monz?n wrote: > Hi Benjamin, > > You can use ctypes for direct access to serial ports via windows apis > (openfile, readfile, writefile...) > > Note that manufacturers can have specific implementations, even they > must agree to PPC implementation, but you can found small differences. > > http://www.codeproject.com/system/simpleserialcomm.asp > > Regards, > Gonzalo > > > Benjamin McBride escribi?: > > > Hi All, > > > > I need to access the serial port for my PPC application. I have been > > unable to locate information on this. I'm using Python 2.4.3 and PPC > > 2003. Previously I've used pyserial, but it appears that pyserial does > > not work on Windows CE. > > > > Thanks for any suggestions, > > > > Ben McBride > > bdm7935 at ksu.edu > >_______________________________________________ > >PythonCE mailing list > >PythonCE at python.org > >http://mail.python.org/mailman/listinfo/pythonce > > > > > > > > From gmc at serveisw3.net Tue Jun 20 22:42:02 2006 From: gmc at serveisw3.net (=?ISO-8859-1?Q?Gonzalo_Monz=F3n?=) Date: Tue, 20 Jun 2006 22:42:02 +0200 Subject: [PythonCE] serial port access In-Reply-To: References: <44981DB8.4050502@serveisw3.net> Message-ID: <44985D9A.5030305@serveisw3.net> Have you read the ctypes docs? http://starship.python.net/crew/theller/ctypes/tutorial.html You have to read the Microsoft docs too, search what dynamic libraries to use and what functions to call. Study the example I posted, you have to call these functions using ctypes: (openfile, readfile, writefile...) Don't know if somebody has implemented serial access using ctypes as to post an example, read the docs, first you need to understand how ctypes work -for that you should know or learn what C variable types are and understand it almost a little bit, then the codeproject example will come in handy- otherwise could be hard to code... Though any ctypes example handling file or stream data may help you. Though pyserial uses ctypes too, so you could have a look to the sources. The differences are you have to use straight windows api calls, and pyserial calls a helper library wich should use windows api's for windows platform. I have to code serial access too in the next weeks, but don't have the time now to get my hands in it. If you are not in hurry I could post an example when done. Gonzalo. Benjamin McBride escribi?: >I've got ctypes installed. However, I have not been able to find any >examples of how I might use ctypes for serial port access. Any >suggestions would be appreciated. > >Thanks, > >Ben > >On 6/20/06, Gonzalo Monz?n wrote: > > >>Hi Benjamin, >> >>You can use ctypes for direct access to serial ports via windows apis >>(openfile, readfile, writefile...) >> >>Note that manufacturers can have specific implementations, even they >>must agree to PPC implementation, but you can found small differences. >> >>http://www.codeproject.com/system/simpleserialcomm.asp >> >>Regards, >>Gonzalo >> >> >>Benjamin McBride escribi?: >> >> >> >>> Hi All, >>> >>> I need to access the serial port for my PPC application. I have been >>> unable to locate information on this. I'm using Python 2.4.3 and PPC >>> 2003. Previously I've used pyserial, but it appears that pyserial does >>> not work on Windows CE. >>> >>> Thanks for any suggestions, >>> >>> Ben McBride >>> bdm7935 at ksu.edu >>>_______________________________________________ >>>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 benjamin.mcbride at gmail.com Tue Jun 20 22:54:18 2006 From: benjamin.mcbride at gmail.com (Benjamin McBride) Date: Tue, 20 Jun 2006 15:54:18 -0500 Subject: [PythonCE] serial port access In-Reply-To: <44985D9A.5030305@serveisw3.net> References: <44981DB8.4050502@serveisw3.net> <44985D9A.5030305@serveisw3.net> Message-ID: Thanks Gonzalo for your help. I have read both the ctypes and microsoft documentation. My understanding is that I need to use the CreateFile API function from the coredll to get a handle to the comm port. When I use ctypes: >>> windll.coredll.CreateFile I get an AttributeError saying the CreateFile function is not found. Ironically, the ReadFile, WriteFile, and CloseHandle functions are all found. Am I just missing something simple here? Ben On 6/20/06, Gonzalo Monz?n wrote: > Have you read the ctypes docs? > > http://starship.python.net/crew/theller/ctypes/tutorial.html > > You have to read the Microsoft docs too, search what dynamic libraries > to use and what functions to call. Study the example I posted, you have > to call these functions using ctypes: > > (openfile, readfile, writefile...) > > Don't know if somebody has implemented serial access using ctypes as to > post an example, read the docs, first you need to understand how ctypes > work -for that you should know or learn what C variable types are and > understand it almost a little bit, then the codeproject example will > come in handy- otherwise could be hard to code... Though any ctypes > example handling file or stream data may help you. Though pyserial uses > ctypes too, so you could have a look to the sources. The differences are > you have to use straight windows api calls, and pyserial calls a helper > library wich should use windows api's for windows platform. > > I have to code serial access too in the next weeks, but don't have the > time now to get my hands in it. If you are not in hurry I could post an > example when done. > > Gonzalo. > > > Benjamin McBride escribi?: > > >I've got ctypes installed. However, I have not been able to find any > >examples of how I might use ctypes for serial port access. Any > >suggestions would be appreciated. > > > >Thanks, > > > >Ben > > > >On 6/20/06, Gonzalo Monz?n wrote: > > > > > >>Hi Benjamin, > >> > >>You can use ctypes for direct access to serial ports via windows apis > >>(openfile, readfile, writefile...) > >> > >>Note that manufacturers can have specific implementations, even they > >>must agree to PPC implementation, but you can found small differences. > >> > >>http://www.codeproject.com/system/simpleserialcomm.asp > >> > >>Regards, > >>Gonzalo > >> > >> > >>Benjamin McBride escribi?: > >> > >> > >> > >>> Hi All, > >>> > >>> I need to access the serial port for my PPC application. I have been > >>> unable to locate information on this. I'm using Python 2.4.3 and PPC > >>> 2003. Previously I've used pyserial, but it appears that pyserial does > >>> not work on Windows CE. > >>> > >>> Thanks for any suggestions, > >>> > >>> Ben McBride > >>> bdm7935 at ksu.edu > >>>_______________________________________________ > >>>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 TGalvin at geminidataloggers.com Wed Jun 21 12:28:57 2006 From: TGalvin at geminidataloggers.com (Tom Galvin) Date: Wed, 21 Jun 2006 11:28:57 +0100 Subject: [PythonCE] serial port access In-Reply-To: Message-ID: Hi Benjamin We have achieved serial port access by applying the following patches to the build. I would be interested in any success you have using other methods. - Apply the following patch to PYTHONCEROOT\\PCbuild\\WinCE\\External-Components\\PyWin32\makefile 19c19,20 wince --- wince \ win32file 76a77,84 # win32file: # win32file: @cd ..\.. @$(NMAKE) -f External-Components\PyWin32\makefile.win32file SWIGROOT=$(SWIGROOT) @cd External-Components\PyWin32 # 84a93 @$(NMAKE) -f External-Components\PyWin32\makefile.win32file clean - Add the attached makefile.win32file to PYTHONCEROOT\\PCbuild\\WinCE\\External-Components\\PyWin32 - Add the attached win32file_comm_wince.cpp and win32filemodule_wince.cpp source files to PYWIN32ROOT\\win32\\src - Add an empty file `io.h` to PYTHONCEROOT\\PC\\WinCE Regards Tom >>-----Original Message----- >>From: pythonce-bounces at python.org [mailto:pythonce-bounces at python.org] On >>Behalf Of pythonce-request at python.org >>Sent: 21 June 2006 11:00 >>To: pythonce at python.org >>Subject: PythonCE Digest, Vol 35, Issue 8 >> >>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. serial port access (Benjamin McBride) >> 2. Re: serial port access (Gonzalo Monz?n) >> 3. Re: serial port access (Benjamin McBride) >> 4. Re: serial port access (Gonzalo Monz?n) >> 5. Re: serial port access (Benjamin McBride) >> >> >>---------------------------------------------------------------------- >> >>Message: 1 >>Date: Tue, 20 Jun 2006 10:20:05 -0500 >>From: "Benjamin McBride" >>Subject: [PythonCE] serial port access >>To: pythonce at python.org >>Message-ID: >> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi All, >> >> I need to access the serial port for my PPC application. I have been >> unable to locate information on this. I'm using Python 2.4.3 and PPC >> 2003. Previously I've used pyserial, but it appears that pyserial >>does >> not work on Windows CE. >> >> Thanks for any suggestions, >> >> Ben McBride >> bdm7935 at ksu.edu >> >> >>------------------------------ >> >>Message: 2 >>Date: Tue, 20 Jun 2006 18:09:28 +0200 >>From: Gonzalo Monz?n >>Subject: Re: [PythonCE] serial port access >>To: Benjamin McBride >>Cc: pythonce at python.org >>Message-ID: <44981DB8.4050502 at serveisw3.net> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>Hi Benjamin, >> >>You can use ctypes for direct access to serial ports via windows apis >>(openfile, readfile, writefile...) >> >>Note that manufacturers can have specific implementations, even they >>must agree to PPC implementation, but you can found small differences. >> >>http://www.codeproject.com/system/simpleserialcomm.asp >> >>Regards, >>Gonzalo >> >> >>Benjamin McBride escribi?: >> >>> Hi All, >>> >>> I need to access the serial port for my PPC application. I have >>been >>> unable to locate information on this. I'm using Python 2.4.3 and >>PPC >>> 2003. Previously I've used pyserial, but it appears that pyserial >>does >>> not work on Windows CE. >>> >>> Thanks for any suggestions, >>> >>> Ben McBride >>> bdm7935 at ksu.edu >>>_______________________________________________ >>>PythonCE mailing list >>>PythonCE at python.org >>>http://mail.python.org/mailman/listinfo/pythonce >>> >>> >>> >> >> >> >>------------------------------ >> >>Message: 3 >>Date: Tue, 20 Jun 2006 15:11:34 -0500 >>From: "Benjamin McBride" >>Subject: Re: [PythonCE] serial port access >>To: pythonce at python.org >>Message-ID: >> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>I've got ctypes installed. However, I have not been able to find any >>examples of how I might use ctypes for serial port access. Any >>suggestions would be appreciated. >> >>Thanks, >> >>Ben >> >>On 6/20/06, Gonzalo Monz?n wrote: >>> Hi Benjamin, >>> >>> You can use ctypes for direct access to serial ports via windows apis >>> (openfile, readfile, writefile...) >>> >>> Note that manufacturers can have specific implementations, even they >>> must agree to PPC implementation, but you can found small differences. >>> >>> http://www.codeproject.com/system/simpleserialcomm.asp >>> >>> Regards, >>> Gonzalo >>> >>> >>> Benjamin McBride escribi?: >>> >>> > Hi All, >>> > >>> > I need to access the serial port for my PPC application. I have >>been >>> > unable to locate information on this. I'm using Python 2.4.3 and >>PPC >>> > 2003. Previously I've used pyserial, but it appears that pyserial >>does >>> > not work on Windows CE. >>> > >>> > Thanks for any suggestions, >>> > >>> > Ben McBride >>> > bdm7935 at ksu.edu >>> >_______________________________________________ >>> >PythonCE mailing list >>> >PythonCE at python.org >>> >http://mail.python.org/mailman/listinfo/pythonce >>> > >>> > >>> > >>> >>> >> >> >>------------------------------ >> >>Message: 4 >>Date: Tue, 20 Jun 2006 22:42:02 +0200 >>From: Gonzalo Monz?n >>Subject: Re: [PythonCE] serial port access >>To: Benjamin McBride >>Cc: pythonce at python.org >>Message-ID: <44985D9A.5030305 at serveisw3.net> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>Have you read the ctypes docs? >> >>http://starship.python.net/crew/theller/ctypes/tutorial.html >> >>You have to read the Microsoft docs too, search what dynamic libraries >>to use and what functions to call. Study the example I posted, you have >>to call these functions using ctypes: >> >>(openfile, readfile, writefile...) >> >>Don't know if somebody has implemented serial access using ctypes as to >>post an example, read the docs, first you need to understand how ctypes >>work -for that you should know or learn what C variable types are and >>understand it almost a little bit, then the codeproject example will >>come in handy- otherwise could be hard to code... Though any ctypes >>example handling file or stream data may help you. Though pyserial uses >>ctypes too, so you could have a look to the sources. The differences are >>you have to use straight windows api calls, and pyserial calls a helper >>library wich should use windows api's for windows platform. >> >>I have to code serial access too in the next weeks, but don't have the >>time now to get my hands in it. If you are not in hurry I could post an >>example when done. >> >>Gonzalo. >> >> >>Benjamin McBride escribi?: >> >>>I've got ctypes installed. However, I have not been able to find any >>>examples of how I might use ctypes for serial port access. Any >>>suggestions would be appreciated. >>> >>>Thanks, >>> >>>Ben >>> >>>On 6/20/06, Gonzalo Monz?n wrote: >>> >>> >>>>Hi Benjamin, >>>> >>>>You can use ctypes for direct access to serial ports via windows apis >>>>(openfile, readfile, writefile...) >>>> >>>>Note that manufacturers can have specific implementations, even they >>>>must agree to PPC implementation, but you can found small differences. >>>> >>>>http://www.codeproject.com/system/simpleserialcomm.asp >>>> >>>>Regards, >>>>Gonzalo >>>> >>>> >>>>Benjamin McBride escribi?: >>>> >>>> >>>> >>>>> Hi All, >>>>> >>>>> I need to access the serial port for my PPC application. I have >>been >>>>> unable to locate information on this. I'm using Python 2.4.3 and >>PPC >>>>> 2003. Previously I've used pyserial, but it appears that pyserial >>does >>>>> not work on Windows CE. >>>>> >>>>> Thanks for any suggestions, >>>>> >>>>> Ben McBride >>>>> bdm7935 at ksu.edu >>>>>_______________________________________________ >>>>>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 >>> >>> >>> >> >> >> >>------------------------------ >> >>Message: 5 >>Date: Tue, 20 Jun 2006 15:54:18 -0500 >>From: "Benjamin McBride" >>Subject: Re: [PythonCE] serial port access >>To: pythonce at python.org >>Message-ID: >> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>Thanks Gonzalo for your help. I have read both the ctypes and >>microsoft documentation. My understanding is that I need to use the >>CreateFile API function from the coredll to get a handle to the comm >>port. When I use ctypes: >> >>>>> windll.coredll.CreateFile >> >>I get an AttributeError saying the CreateFile function is not found. >>Ironically, the ReadFile, WriteFile, and CloseHandle functions are all >>found. >> >>Am I just missing something simple here? >> >>Ben >> >>On 6/20/06, Gonzalo Monz?n wrote: >>> Have you read the ctypes docs? >>> >>> http://starship.python.net/crew/theller/ctypes/tutorial.html >>> >>> You have to read the Microsoft docs too, search what dynamic libraries >>> to use and what functions to call. Study the example I posted, you have >>> to call these functions using ctypes: >>> >>> (openfile, readfile, writefile...) >>> >>> Don't know if somebody has implemented serial access using ctypes as to >>> post an example, read the docs, first you need to understand how ctypes >>> work -for that you should know or learn what C variable types are and >>> understand it almost a little bit, then the codeproject example will >>> come in handy- otherwise could be hard to code... Though any ctypes >>> example handling file or stream data may help you. Though pyserial uses >>> ctypes too, so you could have a look to the sources. The differences are >>> you have to use straight windows api calls, and pyserial calls a helper >>> library wich should use windows api's for windows platform. >>> >>> I have to code serial access too in the next weeks, but don't have the >>> time now to get my hands in it. If you are not in hurry I could post an >>> example when done. >>> >>> Gonzalo. >>> >>> >>> Benjamin McBride escribi?: >>> >>> >I've got ctypes installed. However, I have not been able to find any >>> >examples of how I might use ctypes for serial port access. Any >>> >suggestions would be appreciated. >>> > >>> >Thanks, >>> > >>> >Ben >>> > >>> >On 6/20/06, Gonzalo Monz?n wrote: >>> > >>> > >>> >>Hi Benjamin, >>> >> >>> >>You can use ctypes for direct access to serial ports via windows apis >>> >>(openfile, readfile, writefile...) >>> >> >>> >>Note that manufacturers can have specific implementations, even they >>> >>must agree to PPC implementation, but you can found small differences. >>> >> >>> >>http://www.codeproject.com/system/simpleserialcomm.asp >>> >> >>> >>Regards, >>> >>Gonzalo >>> >> >>> >> >>> >>Benjamin McBride escribi?: >>> >> >>> >> >>> >> >>> >>> Hi All, >>> >>> >>> >>> I need to access the serial port for my PPC application. I have >>been >>> >>> unable to locate information on this. I'm using Python 2.4.3 and >>PPC >>> >>> 2003. Previously I've used pyserial, but it appears that >>pyserial does >>> >>> not work on Windows CE. >>> >>> >>> >>> Thanks for any suggestions, >>> >>> >>> >>> Ben McBride >>> >>> bdm7935 at ksu.edu >>> >>>_______________________________________________ >>> >>>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 >>> > >>> > >>> > >>> >>> >> >> >>------------------------------ >> >>_______________________________________________ >>PythonCE mailing list >>PythonCE at python.org >>http://mail.python.org/mailman/listinfo/pythonce >> >> >>End of PythonCE Digest, Vol 35, Issue 8 >>*************************************** ____________________ 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 -------------- A non-text attachment was scrubbed... Name: makefile.win32file Type: application/octet-stream Size: 710 bytes Desc: makefile.win32file Url : http://mail.python.org/pipermail/pythonce/attachments/20060621/2d1b2348/attachment-0003.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: win32filemodule_wince.cpp Type: application/octet-stream Size: 60466 bytes Desc: win32filemodule_wince.cpp Url : http://mail.python.org/pipermail/pythonce/attachments/20060621/2d1b2348/attachment-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: win32file_comm_wince.cpp Type: application/octet-stream Size: 13862 bytes Desc: win32file_comm_wince.cpp Url : http://mail.python.org/pipermail/pythonce/attachments/20060621/2d1b2348/attachment-0005.obj From coder_infidel at hotmail.com Wed Jun 21 15:05:50 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Wed, 21 Jun 2006 21:05:50 +0800 Subject: [PythonCE] serial port access References: <44981DB8.4050502@serveisw3.net><44985D9A.5030305@serveisw3.net> Message-ID: You need to use the wide-character variants of Windows APIs, i.e. CreateFileW Luke ----- Original Message ----- From: "Benjamin McBride" To: Sent: Wednesday, June 21, 2006 4:54 AM Subject: Re: [PythonCE] serial port access Thanks Gonzalo for your help. I have read both the ctypes and microsoft documentation. My understanding is that I need to use the CreateFile API function from the coredll to get a handle to the comm port. When I use ctypes: >>> windll.coredll.CreateFile I get an AttributeError saying the CreateFile function is not found. Ironically, the ReadFile, WriteFile, and CloseHandle functions are all found. Am I just missing something simple here? Ben On 6/20/06, Gonzalo Monz?n wrote: > Have you read the ctypes docs? > > http://starship.python.net/crew/theller/ctypes/tutorial.html > > You have to read the Microsoft docs too, search what dynamic libraries > to use and what functions to call. Study the example I posted, you have > to call these functions using ctypes: > > (openfile, readfile, writefile...) > > Don't know if somebody has implemented serial access using ctypes as to > post an example, read the docs, first you need to understand how ctypes > work -for that you should know or learn what C variable types are and > understand it almost a little bit, then the codeproject example will > come in handy- otherwise could be hard to code... Though any ctypes > example handling file or stream data may help you. Though pyserial uses > ctypes too, so you could have a look to the sources. The differences are > you have to use straight windows api calls, and pyserial calls a helper > library wich should use windows api's for windows platform. > > I have to code serial access too in the next weeks, but don't have the > time now to get my hands in it. If you are not in hurry I could post an > example when done. > > Gonzalo. > > > Benjamin McBride escribi?: > > >I've got ctypes installed. However, I have not been able to find any > >examples of how I might use ctypes for serial port access. Any > >suggestions would be appreciated. > > > >Thanks, > > > >Ben > > > >On 6/20/06, Gonzalo Monz?n wrote: > > > > > >>Hi Benjamin, > >> > >>You can use ctypes for direct access to serial ports via windows apis > >>(openfile, readfile, writefile...) > >> > >>Note that manufacturers can have specific implementations, even they > >>must agree to PPC implementation, but you can found small differences. > >> > >>http://www.codeproject.com/system/simpleserialcomm.asp > >> > >>Regards, > >>Gonzalo > >> > >> > >>Benjamin McBride escribi?: > >> > >> > >> > >>> Hi All, > >>> > >>> I need to access the serial port for my PPC application. I have > >>> been > >>> unable to locate information on this. I'm using Python 2.4.3 and > >>> PPC > >>> 2003. Previously I've used pyserial, but it appears that pyserial > >>> does > >>> not work on Windows CE. > >>> > >>> Thanks for any suggestions, > >>> > >>> Ben McBride > >>> bdm7935 at ksu.edu > >>>_______________________________________________ > >>>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 > > > > > > > > _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From M.C.Smit at tm.tue.nl Fri Jun 23 17:21:18 2006 From: M.C.Smit at tm.tue.nl (Smit, M.C.) Date: Fri, 23 Jun 2006 17:21:18 +0200 Subject: [PythonCE] building a 'simple' example Message-ID: Dear all While there have been some posts on this topic I don't believe the answer is in there jet. Eventually I want to write (with help of a colliegue whom is experienced in c) a module that can use a device. Some c libraries are available, and all I realy need is a function that returns an Int or String when called. I am trying to to build and run Listing 29-1 from the Python bible, but so far I have been unable to compile annything that will work. MS eVC is installed, and it compiles and links with no errors or warnings. but when I put the dll on the PDA, and run a test program all I get is an ImportError: DLL load failed:The specified module could not be found. it can clearly find the file couse it knows it is a dll. I'm hoplessly lost on what could be wrong, does annyone have any ideas. Cheers here is the code: // simple.cpp : Defines the entry point for the DLL application. // #include "Python.h" static PyObject *simple_add(PyObject *pSelf, PyObject *pArgs) { PyObject *pX, *pY; if (!PyArg_ParseTuple(pArgs, "OO", &pX, &pY)) return NULL; return PyNumber_Add(pX, pY); } static char count_doc[] = "returns the number of arguments passed in"; static PyObject *simple_count(PyObject *pSelf, PyObject *pArgs) { long count = PyTuple_Size(pArgs); return PyInt_FromLong(count); } static PyMethodDef simple_methods[] = { {"add", simple_add, METH_VARARGS, NULL}, {"count", simple_count, METH_VARARGS, count_doc}, {NULL, NULL} }; DL_EXPORT(void) initsimple() { Py_InitModule("simple", simple_methods); } From coder_infidel at hotmail.com Fri Jun 23 18:04:54 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 24 Jun 2006 00:04:54 +0800 Subject: [PythonCE] building a 'simple' example References: Message-ID: Hi, Where did you put the DLL? What is it called? What were the commands that failed? Luke ----- Original Message ----- From: "Smit, M.C." To: Sent: Friday, June 23, 2006 11:21 PM Subject: [PythonCE] building a 'simple' example > Dear all > > While there have been some posts on this topic I don't believe the answer > is in there jet. > > Eventually I want to write (with help of a colliegue whom is experienced > in c) a module that can use a device. Some c libraries are available, and > all I realy need is a function that returns an Int or String when called. > > I am trying to to build and run Listing 29-1 from the Python bible, > but so far I have been unable to compile annything that will work. > MS eVC is installed, and it compiles and links with no errors or warnings. > but when I put the dll on the PDA, and run a test program all I get is an > > ImportError: DLL load failed:The specified module could not be found. > > it can clearly find the file couse it knows it is a dll. I'm hoplessly > lost on what could be wrong, does annyone have any ideas. > > Cheers > > > here is the code: > // simple.cpp : Defines the entry point for the DLL application. > // > > #include "Python.h" > > static PyObject *simple_add(PyObject *pSelf, PyObject *pArgs) > { > PyObject *pX, *pY; > > if (!PyArg_ParseTuple(pArgs, "OO", &pX, &pY)) > return NULL; > > return PyNumber_Add(pX, pY); > } > > static char count_doc[] = "returns the number of arguments passed in"; > > static PyObject *simple_count(PyObject *pSelf, PyObject *pArgs) > { > long count = PyTuple_Size(pArgs); > return PyInt_FromLong(count); > } > > static PyMethodDef simple_methods[] = > { > {"add", simple_add, METH_VARARGS, NULL}, > {"count", simple_count, METH_VARARGS, count_doc}, > {NULL, NULL} > }; > > DL_EXPORT(void) initsimple() > { > Py_InitModule("simple", simple_methods); > } From benjamin.mcbride at gmail.com Fri Jun 23 18:20:23 2006 From: benjamin.mcbride at gmail.com (Benjamin McBride) Date: Fri, 23 Jun 2006 11:20:23 -0500 Subject: [PythonCE] serial port access In-Reply-To: References: <44981DB8.4050502@serveisw3.net> <44985D9A.5030305@serveisw3.net> Message-ID: Thanks all for your help! The final key was to use the wide-character variant of CreateFile. As soon as I have the code cleaned up I will post the code (should be in the next day or so). It will have a similar interface as pySerial. Thanks, Ben McBride On 6/21/06, Luke Dunstan wrote: > > You need to use the wide-character variants of Windows APIs, i.e. > CreateFileW > > Luke > > ----- Original Message ----- > From: "Benjamin McBride" > To: > Sent: Wednesday, June 21, 2006 4:54 AM > Subject: Re: [PythonCE] serial port access > > > Thanks Gonzalo for your help. I have read both the ctypes and > microsoft documentation. My understanding is that I need to use the > CreateFile API function from the coredll to get a handle to the comm > port. When I use ctypes: > > >>> windll.coredll.CreateFile > > I get an AttributeError saying the CreateFile function is not found. > Ironically, the ReadFile, WriteFile, and CloseHandle functions are all > found. > > Am I just missing something simple here? > > Ben > > On 6/20/06, Gonzalo Monz?n wrote: > > Have you read the ctypes docs? > > > > http://starship.python.net/crew/theller/ctypes/tutorial.html > > > > You have to read the Microsoft docs too, search what dynamic libraries > > to use and what functions to call. Study the example I posted, you have > > to call these functions using ctypes: > > > > (openfile, readfile, writefile...) > > > > Don't know if somebody has implemented serial access using ctypes as to > > post an example, read the docs, first you need to understand how ctypes > > work -for that you should know or learn what C variable types are and > > understand it almost a little bit, then the codeproject example will > > come in handy- otherwise could be hard to code... Though any ctypes > > example handling file or stream data may help you. Though pyserial uses > > ctypes too, so you could have a look to the sources. The differences are > > you have to use straight windows api calls, and pyserial calls a helper > > library wich should use windows api's for windows platform. > > > > I have to code serial access too in the next weeks, but don't have the > > time now to get my hands in it. If you are not in hurry I could post an > > example when done. > > > > Gonzalo. > > > > > > Benjamin McBride escribi?: > > > > >I've got ctypes installed. However, I have not been able to find any > > >examples of how I might use ctypes for serial port access. Any > > >suggestions would be appreciated. > > > > > >Thanks, > > > > > >Ben > > > > > >On 6/20/06, Gonzalo Monz?n wrote: > > > > > > > > >>Hi Benjamin, > > >> > > >>You can use ctypes for direct access to serial ports via windows apis > > >>(openfile, readfile, writefile...) > > >> > > >>Note that manufacturers can have specific implementations, even they > > >>must agree to PPC implementation, but you can found small differences. > > >> > > >>http://www.codeproject.com/system/simpleserialcomm.asp > > >> > > >>Regards, > > >>Gonzalo > > >> > > >> > > >>Benjamin McBride escribi?: > > >> > > >> > > >> > > >>> Hi All, > > >>> > > >>> I need to access the serial port for my PPC application. I have > > >>> been > > >>> unable to locate information on this. I'm using Python 2.4.3 and > > >>> PPC > > >>> 2003. Previously I've used pyserial, but it appears that pyserial > > >>> does > > >>> not work on Windows CE. > > >>> > > >>> Thanks for any suggestions, > > >>> > > >>> Ben McBride > > >>> bdm7935 at ksu.edu > > >>>_______________________________________________ > > >>>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 > > > > > > > > > > > > > > _______________________________________________ > 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 ke7fxl at gmail.com Sat Jun 24 05:07:00 2006 From: ke7fxl at gmail.com (Tod Haren) Date: Fri, 23 Jun 2006 20:07:00 -0700 Subject: [PythonCE] Problem with ctypes Message-ID: <6f5b2c4e0606232007k32f117bbyf23634b33a8ab6f8@mail.gmail.com> The wince files on the ctypes sourceforge project site don't work for me. import ctypes was resulting in "import error: dll load failed". I claimed to be unable to locate _ctypes.pyd even though it was present and in sys.path. I tried both 0.9.9.6 and 0.9.9.3 with no luck, I tried different paths and configurations too. I finally checked the the pythonce project and downloaded the 0.9.9.6 files from there. They worked like a charm and now I'm up and running ctypes again. I have Python 2.4.3 running on a Dell Axim X5 with PPC 2003, installed to the SD Card. Has anyone else had similar problems? Tod From coder_infidel at hotmail.com Sat Jun 24 10:20:13 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 24 Jun 2006 16:20:13 +0800 Subject: [PythonCE] Problem with ctypes References: <6f5b2c4e0606232007k32f117bbyf23634b33a8ab6f8@mail.gmail.com> Message-ID: ----- Original Message ----- From: "Tod Haren" To: Sent: Saturday, June 24, 2006 11:07 AM Subject: [PythonCE] Problem with ctypes > The wince files on the ctypes sourceforge project site don't work for > me. import ctypes was resulting in "import error: dll load failed". > I claimed to be unable to locate _ctypes.pyd even though it was > present and in sys.path. I tried both 0.9.9.6 and 0.9.9.3 with no > luck, I tried different paths and configurations too. What was the name of the file you downloaded from the ctypes project? Are you sure it wasn't for Python 2.3? Luke > > I finally checked the the pythonce project and downloaded the 0.9.9.6 > files from there. They worked like a charm and now I'm up and running > ctypes again. > > I have Python 2.4.3 running on a Dell Axim X5 with PPC 2003, installed > to the SD Card. > > Has anyone else had similar problems? > > Tod From ahmad at newhive.com Sun Jun 25 13:00:35 2006 From: ahmad at newhive.com (ahmad adel rldardiry) Date: Sun, 25 Jun 2006 14:00:35 +0300 Subject: [PythonCE] Command line Message-ID: <001e01c69846$9a0e5100$1501a8c0@ahmad> ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Can I execute a .py as a commandline parameter to pythonce, giving that python is installed on the device? eg. start python.exe t.py (-hidden?) Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060625/2d193c69/attachment.htm From M.C.Smit at tm.tue.nl Mon Jun 26 09:40:50 2006 From: M.C.Smit at tm.tue.nl (Smit, M.C.) Date: Mon, 26 Jun 2006 09:40:50 +0200 Subject: [PythonCE] building a 'simple' example References: Message-ID: Hi The path is in sys.path. The DLL is next to the test programme that tries to import it, it name is simple.dll, andthe error is raised on: import simple ImportError: DLL load failed:The specified module could not be found. I'm running an winXP computer and an Ipac PDA winMobile 2003 thanks for your thoughts -----Original Message----- From: pythonce-bounces at python.org on behalf of Luke Dunstan Sent: Fri 6/23/2006 6:04 PM To: pythonce at python.org Cc: Subject: Re: [PythonCE] building a 'simple' example Hi, Where did you put the DLL? What is it called? What were the commands that failed? Luke ----- Original Message ----- From: "Smit, M.C." To: Sent: Friday, June 23, 2006 11:21 PM Subject: [PythonCE] building a 'simple' example > Dear all > > While there have been some posts on this topic I don't believe the answer > is in there jet. > > Eventually I want to write (with help of a colliegue whom is experienced > in c) a module that can use a device. Some c libraries are available, and > all I realy need is a function that returns an Int or String when called. > > I am trying to to build and run Listing 29-1 from the Python bible, > but so far I have been unable to compile annything that will work. > MS eVC is installed, and it compiles and links with no errors or warnings. > but when I put the dll on the PDA, and run a test program all I get is an > > ImportError: DLL load failed:The specified module could not be found. > > it can clearly find the file couse it knows it is a dll. I'm hoplessly > lost on what could be wrong, does annyone have any ideas. > > Cheers > > > here is the code: > // simple.cpp : Defines the entry point for the DLL application. > // > > #include "Python.h" > > static PyObject *simple_add(PyObject *pSelf, PyObject *pArgs) > { > PyObject *pX, *pY; > > if (!PyArg_ParseTuple(pArgs, "OO", &pX, &pY)) > return NULL; > > return PyNumber_Add(pX, pY); > } > > static char count_doc[] = "returns the number of arguments passed in"; > > static PyObject *simple_count(PyObject *pSelf, PyObject *pArgs) > { > long count = PyTuple_Size(pArgs); > return PyInt_FromLong(count); > } > > static PyMethodDef simple_methods[] = > { > {"add", simple_add, METH_VARARGS, NULL}, > {"count", simple_count, METH_VARARGS, count_doc}, > {NULL, NULL} > }; > > DL_EXPORT(void) initsimple() > { > Py_InitModule("simple", simple_methods); > } _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From gpetruc at gmail.com Mon Jun 26 15:59:22 2006 From: gpetruc at gmail.com (Giovanni Petrucciani) Date: Mon, 26 Jun 2006 15:59:22 +0200 Subject: [PythonCE] building a 'simple' example In-Reply-To: References: Message-ID: <449FE83A.6080502@gmail.com> Smit, M.C. wrote: > Hi > > The path is in sys.path. The DLL is next to the test programme that tries to import it, it name is simple.dll, andthe error is raised on: import simple > > ImportError: DLL load failed:The specified module could not be found. > Just to catch a possible simple bug: did you rename the dll ? I had problems when I was compiling sqlite, because I did build the dll with a wrong name with EVC and then renamed it, but dll have their name coded also inside and so it was not working. Giovanni From generic3.20.fusion at neverbox.com Tue Jun 27 09:13:39 2006 From: generic3.20.fusion at neverbox.com (Kevin Goodsell) Date: Tue, 27 Jun 2006 00:13:39 -0700 Subject: [PythonCE] Non-Python threads crash on errno access In-Reply-To: <3e1a4c040606270002i2e8b2ac5g4dc0fa71e3e13981@mail.gmail.com> References: <3e1a4c040606270002i2e8b2ac5g4dc0fa71e3e13981@mail.gmail.com> Message-ID: <3e1a4c040606270013t7dd16fa4r918ad29a70fbaf30@mail.gmail.com> We have a scenario where a Python program uses a C++ module. The C++ module creates its own threads, and these threads sometimes call back into Python (after first acquiring the GIL, of course). This works quite nicely on Linux and desktop Windows, but crashes on CE. After some debugging I discovered the cause: PythonCE uses its own errno macro which pulls a pointer out of thread-local storage and dereferences it. This works fine if the thread was started in Python, since new threads have a valid address placed into the thread-local storage slot. Non-Python threads, however, have the default initial value for the slot which happens to be zero, so dereferencing it crashes the program. As far as I can tell, there is no way to work around this that does not involve modifying the PythonCE source. I think we need some call we can make to initialize the thread-local storage for a non-Python thread. The solution is complicated somewhat by the fact that I want to be able to initialize the same thread multiple times without breaking it. The reason for this probably requires some explanation. The straight-forward approach would be to have any new non-Python thread call an initialization function when it starts, then call a de-register function when it finishes (just like Python threads currently do). This approach falls short because it assumes that the creator of a thread knows whether or not that thread will ever call Python. This makes it impossible to take a general-purpose, Python-agnostic C++ module that uses threads and a callback mechanism and expose it to Python in a way that allows callbacks to be written in Python. Because of this, the only sensible approach is to surround the call into Python with our register-thread and de-register-thread functions. This is really not an extra burden, because we already have to surround it with the GIL-acquiring and releasing functions. Now, assume that a thread created in C++ calls into Python, which calls back into C++, which calls into Python again. Since the calls into Python are surrounded by the thread registration/de-registration functions, the registration needs to be smart enough to do nothing the second time, and only de-register the last time. I think I have a solution, but it's not very nice. I'd like to see some suggestions about how to handle this in a more elegant way, and hopefully a permanent solution added to the official distribution. Thanks. -Kevin From M.C.Smit at tm.tue.nl Tue Jun 27 14:41:15 2006 From: M.C.Smit at tm.tue.nl (Smit, M.C.) Date: Tue, 27 Jun 2006 14:41:15 +0200 Subject: [PythonCE] building a 'simple' example References: Message-ID: Giovanni Petrucciani wrote: >Smit, M.C. wrote: >> Hi >> >> The path is in sys.path. The DLL is next to the test programme that tries to >import it, it name is simple.dll, andthe error is raised on: import simple >> >> ImportError: DLL load failed:The specified module could not be found. >> >Just to catch a possible simple bug: did you rename the dll ? >I had problems when I was compiling sqlite, because I did build the dll >with a wrong name with EVC and then renamed it, >but dll have their name coded also inside and so it was not working. > > Giovanni Hi Giovanni Thanks for your hint but the dll was not renamed. (I did try changeing the extention to .pyd but that didn't help either) cheers From coder_infidel at hotmail.com Tue Jun 27 17:12:57 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Tue, 27 Jun 2006 23:12:57 +0800 Subject: [PythonCE] building a 'simple' example References: Message-ID: Hi, I think the only way I could help further is if you posted a small but complete example that demonstrates the problem. Luke ----- Original Message ----- From: "Smit, M.C." To: "Luke Dunstan" ; Sent: Monday, June 26, 2006 3:40 PM Subject: RE: [PythonCE] building a 'simple' example Hi The path is in sys.path. The DLL is next to the test programme that tries to import it, it name is simple.dll, andthe error is raised on: import simple ImportError: DLL load failed:The specified module could not be found. I'm running an winXP computer and an Ipac PDA winMobile 2003 thanks for your thoughts -----Original Message----- From: pythonce-bounces at python.org on behalf of Luke Dunstan Sent: Fri 6/23/2006 6:04 PM To: pythonce at python.org Cc: Subject: Re: [PythonCE] building a 'simple' example Hi, Where did you put the DLL? What is it called? What were the commands that failed? Luke ----- Original Message ----- From: "Smit, M.C." To: Sent: Friday, June 23, 2006 11:21 PM Subject: [PythonCE] building a 'simple' example > Dear all > > While there have been some posts on this topic I don't believe the answer > is in there jet. > > Eventually I want to write (with help of a colliegue whom is experienced > in c) a module that can use a device. Some c libraries are available, and > all I realy need is a function that returns an Int or String when called. > > I am trying to to build and run Listing 29-1 from the Python bible, > but so far I have been unable to compile annything that will work. > MS eVC is installed, and it compiles and links with no errors or warnings. > but when I put the dll on the PDA, and run a test program all I get is an > > ImportError: DLL load failed:The specified module could not be found. > > it can clearly find the file couse it knows it is a dll. I'm hoplessly > lost on what could be wrong, does annyone have any ideas. > > Cheers > > > here is the code: > // simple.cpp : Defines the entry point for the DLL application. > // > > #include "Python.h" > > static PyObject *simple_add(PyObject *pSelf, PyObject *pArgs) > { > PyObject *pX, *pY; > > if (!PyArg_ParseTuple(pArgs, "OO", &pX, &pY)) > return NULL; > > return PyNumber_Add(pX, pY); > } > > static char count_doc[] = "returns the number of arguments passed in"; > > static PyObject *simple_count(PyObject *pSelf, PyObject *pArgs) > { > long count = PyTuple_Size(pArgs); > return PyInt_FromLong(count); > } > > static PyMethodDef simple_methods[] = > { > {"add", simple_add, METH_VARARGS, NULL}, > {"count", simple_count, METH_VARARGS, count_doc}, > {NULL, NULL} > }; > > DL_EXPORT(void) initsimple() > { > Py_InitModule("simple", simple_methods); > } _______________________________________________ PythonCE mailing list PythonCE at python.org http://mail.python.org/mailman/listinfo/pythonce From bnml2 at yahoo.com Tue Jun 27 18:24:09 2006 From: bnml2 at yahoo.com (Craig Thomasson) Date: Tue, 27 Jun 2006 09:24:09 -0700 (PDT) Subject: [PythonCE] Problem with ctypes In-Reply-To: Message-ID: <20060627162410.34725.qmail@web32007.mail.mud.yahoo.com> I also had the same problem with the ctypes 0.9.9.6 module from the ctypes project. I couldn't load the .pyd file directly either regardless of the location of the file. Changing to the ctypes module from the pythonce project made the problem go away for me as well. I did notice in the ctypes project that there are explicit releases for 2.3 and 2.4 for win32, but there is only one release for wince-arm, and no idication if it's for 2.3 or 2.4. Is there any way to tell what version of Python a particular .pyd file is built for without installing different python versions? Craig --- Luke Dunstan wrote: > > ----- Original Message ----- > From: "Tod Haren" > To: > Sent: Saturday, June 24, 2006 11:07 AM > Subject: [PythonCE] Problem with ctypes > > > > The wince files on the ctypes sourceforge project > site don't work for > > me. import ctypes was resulting in "import error: > dll load failed". > > I claimed to be unable to locate _ctypes.pyd even > though it was > > present and in sys.path. I tried both 0.9.9.6 and > 0.9.9.3 with no > > luck, I tried different paths and configurations > too. > > What was the name of the file you downloaded from > the ctypes project? Are > you sure it wasn't for Python 2.3? > > Luke > > > > > I finally checked the the pythonce project and > downloaded the 0.9.9.6 > > files from there. They worked like a charm and > now I'm up and running > > ctypes again. > > > > I have Python 2.4.3 running on a Dell Axim X5 with > PPC 2003, installed > > to the SD Card. > > > > Has anyone else had similar problems? > > > > Tod > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From coder_infidel at hotmail.com Wed Jun 28 13:51:02 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Wed, 28 Jun 2006 19:51:02 +0800 Subject: [PythonCE] Command line References: <001e01c69846$9a0e5100$1501a8c0@ahmad> Message-ID: Hi, Yes, you can run Python scripts by passing them on the command line to python.exe. This is what happens when you double-click a script. Are you having trouble in some way? Luke ----- Original Message ----- From: ahmad adel rldardiry To: PythonCE at python.org Sent: Sunday, June 25, 2006 7:00 PM Subject: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Can I execute a .py as a commandline parameter to pythonce, giving that python is installed on the device? eg. start python.exe t.py (-hidden?) Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com ------------------------------------------------------------------------------ _______________________________________________ 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/20060628/e18faa15/attachment.htm From coder_infidel at hotmail.com Wed Jun 28 15:36:40 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Wed, 28 Jun 2006 21:36:40 +0800 Subject: [PythonCE] Command line References: <001e01c69846$9a0e5100$1501a8c0@ahmad> <001401c69aab$b47fd740$0e01a8c0@ahmad> Message-ID: Hi, You will need to pass the script name as an absolute path. See also: http://pythonce.sourceforge.net/Wikka/UsingPythonCE Luke ----- Original Message ----- From: ahmad adel rldardiry To: Luke Dunstan Sent: Wednesday, June 28, 2006 8:09 PM Subject: Re: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Thanks for replying, I thought nobody will! Yes I have tested it in the CMD (www.symbolictools.de) like this: cd program files\python24\ start python.exe t.py in t.py: f=file('pp.txt','w') f.write('Besmellah') f.close() it gaves this error: Traceback (innermost last): : Also I want to be able to hide the file (hidden startup) is this possible? Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com ----- Original Message ----- From: Luke Dunstan To: pythonce at python.org Sent: Wednesday, June 28, 2006 2:51 PM Subject: Re: [PythonCE] Command line Hi, Yes, you can run Python scripts by passing them on the command line to python.exe. This is what happens when you double-click a script. Are you having trouble in some way? Luke ----- Original Message ----- From: ahmad adel rldardiry To: PythonCE at python.org Sent: Sunday, June 25, 2006 7:00 PM Subject: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Can I execute a .py as a commandline parameter to pythonce, giving that python is installed on the device? eg. start python.exe t.py (-hidden?) Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com -------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20060628/0689c318/attachment.html From ke7fxl at gmail.com Wed Jun 28 16:19:06 2006 From: ke7fxl at gmail.com (Tod Haren) Date: Wed, 28 Jun 2006 07:19:06 -0700 Subject: [PythonCE] Problem with ctypes In-Reply-To: <20060627162410.34725.qmail@web32007.mail.mud.yahoo.com> References: <20060627162410.34725.qmail@web32007.mail.mud.yahoo.com> Message-ID: <6f5b2c4e0606280719g68ffbbe5geb4f7c5d06dc7436@mail.gmail.com> I concur with Craig. There was no explicit indication what python version the ctypes wince release was for. At least not an indication that I found. From ke7fxl at gmail.com Thu Jun 29 08:39:32 2006 From: ke7fxl at gmail.com (Tod Haren) Date: Wed, 28 Jun 2006 23:39:32 -0700 Subject: [PythonCE] SQLite database with comtypes Message-ID: <6f5b2c4e0606282339p24e9ccadx13f785898f4f7d30@mail.gmail.com> Are other users having success with SQLite under PythonCE 2.4.3? Are you using pySQLite, comtypes, ctypes, or some other method? I'm having trouble getting started on the PPC. On the desktop it seems to work fine. I've been trying to use comtypes to access a dll put out by the folks at newObjects, since I'm not set up to build SQLite from source and can't seem to find a binary anywhere. If I had the WinCE SQLite binary I suppose PySQLite would work. Any tips, links, etc.? The problem I'm having with the newObjects.sqlite.dbutf8 com module is this: from comtypes.client import CreateObject conn = CreateObject('newObjects.sqlite.dbutf8') conn.Open('\\some path\\aSQLiteDB.db') rs = conn.Execute("SELECT name FROM sqlite_master WHERE type='table';") Traceback (most recent call last): (Very long traceback, here's just the last couple lines of it) File "\SD Card\PythonCE Python24\lib\ctypes\__init__.py", line 312, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'SafeArrayCreateVectorEx' not found The first time I ran CreateObjects on this the generate routines appeared to finish properly. I have not had problems with other com modules, but my experience is very limited here. This is beyond my limited knowledge at this point, of Python and Com programming. Any assistance would be greatly appreciated. Tod From ke7fxl at gmail.com Thu Jun 29 09:38:38 2006 From: ke7fxl at gmail.com (Tod Haren) Date: Thu, 29 Jun 2006 00:38:38 -0700 Subject: [PythonCE] win32com Message-ID: <6f5b2c4e0606290038y2c12b7a0k9a1eda12467b2974@mail.gmail.com> I know this has come up before, but is the win32com module available for PythonCE2.4.3? Google wasn't much help this time. Tod From mhammond at skippinet.com.au Thu Jun 29 09:50:51 2006 From: mhammond at skippinet.com.au (Mark Hammond) Date: Thu, 29 Jun 2006 17:50:51 +1000 Subject: [PythonCE] win32com In-Reply-To: <6f5b2c4e0606290038y2c12b7a0k9a1eda12467b2974@mail.gmail.com> Message-ID: <046601c69b50$be5c5950$100a0a0a@enfoldsystems.local> > I know this has come up before, but is the win32com module available > for PythonCE2.4.3? Google wasn't much help this time. As far as I know, it builds for Python CE (or is very close to it) - but I'm not aware of anyone actually doing that build and making it available. I'm not currently in a position to. Cheers, Mark From TGalvin at geminidataloggers.com Thu Jun 29 09:34:18 2006 From: TGalvin at geminidataloggers.com (Tom Galvin) Date: Thu, 29 Jun 2006 08:34:18 +0100 Subject: [PythonCE] subject Command line In-Reply-To: Message-ID: I use rapistart from Microsoft's Power Toys and run from the Host, for example: "%CEPOWERTOYS%\RAPI_Start\rapistart.exe" "\Program Files\Python\python.exe" " 't.py' 'args'" http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-4 7aa-ab28-6a2b006edfe9&DisplayLang=en >>Message: 1 >>Date: Sun, 25 Jun 2006 14:00:35 +0300 >>From: "ahmad adel rldardiry" >>Subject: [PythonCE] Command line >>To: >>Message-ID: <001e01c69846$9a0e5100$1501a8c0 at ahmad> >>Content-Type: text/plain; charset="windows-1256" >> >>?????? ????? ????? ???? ??????? >>May peace and Allah Mercy and Blessings be upon you, >> >>Can I execute a .py as a commandline parameter to pythonce, giving that >>python is installed on the device? >> >>eg. >>start python.exe t.py (-hidden?) >> >>Thanks >> >> >>?? ??? ??? ???? >>There is no god but Allah >> >> >>???? >>Ahmad >>http://www.shagarah.com >>http://www.newhive.com >>-------------- next part -------------- >>An HTML attachment was scrubbed... >>URL: >>http://mail.python.org/pipermail/pythonce/attachments/20060625/2d193c6 9/at >>tachment.html >> ____________________ 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. ____________________ From gpetruc at gmail.com Thu Jun 29 09:56:31 2006 From: gpetruc at gmail.com (Giovanni Petrucciani) Date: Thu, 29 Jun 2006 09:56:31 +0200 Subject: [PythonCE] SQLite database with comtypes In-Reply-To: <6f5b2c4e0606282339p24e9ccadx13f785898f4f7d30@mail.gmail.com> References: <6f5b2c4e0606282339p24e9ccadx13f785898f4f7d30@mail.gmail.com> Message-ID: <44A387AF.9040301@gmail.com> Tod Haren wrote: > Are other users having success with SQLite under PythonCE 2.4.3? Are > you using pySQLite, comtypes, ctypes, or some other method? I'm > having trouble getting started on the PPC. On the desktop it seems to > work fine. > > I've been trying to use comtypes to access a dll put out by the folks > at newObjects, since I'm not set up to build SQLite from source and > can't seem to find a binary anywhere. If I had the WinCE SQLite > binary I suppose PySQLite would work. Any tips, links, etc.? I was able to compile and run pysqlite on pythonce 2.3.4, I suppose it won't be too hard to make it work also on python 2.4.3 but now I'm really too busy with my thesis work You can find the download and the instructions at http://area51.sns.it/users/giovanni/python (the link was down due to server problems, but now it should be working) Within the download you can find the sqlite3 dll compiled for pocketpc arm, which should be independent from the python version Giovanni From coder_infidel at hotmail.com Thu Jun 29 14:43:50 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Thu, 29 Jun 2006 20:43:50 +0800 Subject: [PythonCE] Command line References: <001e01c69846$9a0e5100$1501a8c0@ahmad><001401c69aab$b47fd740$0e01a8c0@ahmad> <003101c69adb$11f4a980$1f01a8c0@ahmad> Message-ID: It should work with spaces if you quote it properly (this is true of any operating system), e.g. python "\my documents\python\test.py" Luke ----- Original Message ----- From: ahmad adel rldardiry To: Luke Dunstan Sent: Thursday, June 29, 2006 1:48 AM Subject: Re: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Thanks a lot Luke. After some tests, it worked fine, also with the "/nopcceshell" flag (very cool). It seems that python does not accept paths with spaces though: python.exe \Program Files\ ... So now, if I wanted to distribute pythonce with a software I made (for using as command line) what license should I include or even do I have the right to? Thanks again. ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com ----- Original Message ----- From: Luke Dunstan To: pythonce at python.org Sent: Wednesday, June 28, 2006 4:36 PM Subject: Re: [PythonCE] Command line Hi, You will need to pass the script name as an absolute path. See also: http://pythonce.sourceforge.net/Wikka/UsingPythonCE Luke ----- Original Message ----- From: ahmad adel rldardiry To: Luke Dunstan Sent: Wednesday, June 28, 2006 8:09 PM Subject: Re: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Thanks for replying, I thought nobody will! Yes I have tested it in the CMD (www.symbolictools.de) like this: cd program files\python24\ start python.exe t.py in t.py: f=file('pp.txt','w') f.write('Besmellah') f.close() it gaves this error: Traceback (innermost last): : Also I want to be able to hide the file (hidden startup) is this possible? Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com ----- Original Message ----- From: Luke Dunstan To: pythonce at python.org Sent: Wednesday, June 28, 2006 2:51 PM Subject: Re: [PythonCE] Command line Hi, Yes, you can run Python scripts by passing them on the command line to python.exe. This is what happens when you double-click a script. Are you having trouble in some way? Luke ----- Original Message ----- From: ahmad adel rldardiry To: PythonCE at python.org Sent: Sunday, June 25, 2006 7:00 PM Subject: [PythonCE] Command line ?????? ????? ????? ???? ??????? May peace and Allah Mercy and Blessings be upon you, Can I execute a .py as a commandline parameter to pythonce, giving that python is installed on the device? eg. start python.exe t.py (-hidden?) Thanks ?? ??? ??? ???? There is no god but Allah ???? Ahmad http://www.shagarah.com http://www.newhive.com ---------------------------------------------------------------------- _______________________________________________ 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 ---------------------------------------------------------------------------- _______________________________________________ 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/20060629/141258b7/attachment.htm From ke7fxl at gmail.com Thu Jun 29 20:57:41 2006 From: ke7fxl at gmail.com (Tod Haren) Date: Thu, 29 Jun 2006 11:57:41 -0700 Subject: [PythonCE] SQLite database with comtypes In-Reply-To: <44A387AF.9040301@gmail.com> References: <6f5b2c4e0606282339p24e9ccadx13f785898f4f7d30@mail.gmail.com> <44A387AF.9040301@gmail.com> Message-ID: <6f5b2c4e0606291157vf05e67ao809dbc4a069d4ce6@mail.gmail.com> Thanks for the link. If I can get EVC4 working for me, I'll try the build for pySQLite. It would be good practice for me. Tod From coder_infidel at hotmail.com Fri Jun 30 18:14:05 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 1 Jul 2006 00:14:05 +0800 Subject: [PythonCE] Problem with ctypes References: <20060627162410.34725.qmail@web32007.mail.mud.yahoo.com> <6f5b2c4e0606280719g68ffbbe5geb4f7c5d06dc7436@mail.gmail.com> Message-ID: It does say so in the release notes linked from the SourceForge files page: http://sourceforge.net/project/shownotes.php?release_id=411554&group_id=71702 Luke ----- Original Message ----- From: "Tod Haren" To: Sent: Wednesday, June 28, 2006 10:19 PM Subject: Re: [PythonCE] Problem with ctypes >I concur with Craig. There was no explicit indication what > python version the ctypes wince release was for. At least not an > indication that I found. > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce >