From renesd at gmail.com Mon Sep 1 01:22:58 2008 From: renesd at gmail.com (=?ISO-8859-1?Q?Ren=E9_Dudfield?=) Date: Mon, 1 Sep 2008 09:22:58 +1000 Subject: [PythonCE] pygame / ctypes / SDL In-Reply-To: References: <518d94ee0808290943m110f4079jf3d0ac44582d280e@mail.gmail.com> Message-ID: <64ddb72c0808311622s24a87b4fn2bfb716c76ffc140@mail.gmail.com> You do realise pyglet doesn't do openglES, and also requires opengl? Not a good match for WinCE. On Sat, Aug 30, 2008 at 3:58 AM, Thomas Heller wrote: > Adam Walley schrieb: >> Well, I have now got a small demo app working, which makes use of SDL >> LoadBMP, Surface, blit, audio (wav), keysym, and draw functions. I have >> compiled a small DLL, that allows access to these functions through ctypes, >> and it works very well. The core of the application is a python script, >> which then calls the other functions as required. >> >> I will try to post a link shortly, for any one who would like to take a >> look. I am wondering whether this whole exercise is kind of re-inventing the >> wheel, since pygame-ctypes was already attempted. However, so far everything >> seems to be working smoothly, and I am quite encouraged by the results. > > Cool. But, I'm curious: what about pyglet? Has someone tried to port that to WinCE? > > -- > Thanks, > Thomas > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > From adam.walley at gmail.com Wed Sep 3 13:07:09 2008 From: adam.walley at gmail.com (Adam Walley) Date: Wed, 3 Sep 2008 12:07:09 +0100 Subject: [PythonCE] demo PythonCE/SDL app Message-ID: <518d94ee0809030407p22a34cai359e2594a92e0d0a@mail.gmail.com> Hi, all. As promised, here is a link to what I have created so far: watersprite.awardspace.com/python It is a work in progress, but all comments and suggestions are welcome (preferably constructive ones!). I have also had some success in using PPYGUI to call the SDL functions, so I can add an 'exit' button for example. At the moment, the SDL screen needs a window in the background otherwise things start to get messy, because Windows accepts input for other running applications. You can see this effect, by renaming the script with the .pyw extension (SDL does not trap the input, and Python has no window open to do it - that's bad). I would be interested to hear from Alex regarding his PIL library, as this could perhaps be used to handle other image formats? Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor_kaplan at hotmail.com Thu Sep 4 12:29:16 2008 From: igor_kaplan at hotmail.com (Igor Kaplan) Date: Thu, 4 Sep 2008 06:29:16 -0400 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: Message-ID: Hi pythonce experts, [Igor Kaplan] Would like to ask for the suggestion, is there any way to execute the external process from pythonce code? There is the os.exec* functions, however as I understand, they will terminate the current python process and run the external application. I would need to start the external program and still be able to continue with my python code. If it is more complicated then just calling one function, for example if I need to create new thread and so on, I would so much appreciate the little code example. Many, many thanks in advance. Igor. From renesd at gmail.com Fri Sep 5 01:11:09 2008 From: renesd at gmail.com (=?ISO-8859-1?Q?Ren=E9_Dudfield?=) Date: Fri, 5 Sep 2008 09:11:09 +1000 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: References: Message-ID: <64ddb72c0809041611w3c7adf7bgce660cdd8d5b78b6@mail.gmail.com> hi, this page might help: http://docs.python.org/lib/module-subprocess.html I don't know if it works on CE though. cu, On Thu, Sep 4, 2008 at 8:29 PM, Igor Kaplan wrote: > Hi pythonce experts, > [Igor Kaplan] > Would like to ask for the suggestion, is there any way to execute the > external process from pythonce code? There is the os.exec* functions, > however as I understand, they will terminate the current python process and > run the external application. I would need to start the external program and > still be able to continue with my python code. > If it is more complicated then just calling one function, for example if I > need to create new thread and so on, I would so much appreciate the little > code example. > > Many, many thanks in advance. > > Igor. > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > From jabapyth at gmail.com Fri Sep 5 01:23:21 2008 From: jabapyth at gmail.com (Jared Forsyth) Date: Thu, 4 Sep 2008 19:23:21 -0400 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: References: Message-ID: <9a5375240809041623k17d5d229p3449b73e0606de5a@mail.gmail.com> I think what you want is os.startfile On Thu, Sep 4, 2008 at 6:29 AM, Igor Kaplan wrote: > Hi pythonce experts, > [Igor Kaplan] > Would like to ask for the suggestion, is there any way to execute the > external process from pythonce code? There is the os.exec* functions, > however as I understand, they will terminate the current python process and > run the external application. I would need to start the external program > and > still be able to continue with my python code. > If it is more complicated then just calling one function, for example if I > need to create new thread and so on, I would so much appreciate the little > code example. > > Many, many thanks in advance. > > Igor. > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rens.Duijsens at interaccess.nl Fri Sep 5 09:14:34 2008 From: Rens.Duijsens at interaccess.nl (Rens Duijsens) Date: Fri, 5 Sep 2008 09:14:34 +0200 Subject: [PythonCE] demo PythonCE/SDL app In-Reply-To: <518d94ee0809030407p22a34cai359e2594a92e0d0a@mail.gmail.com> References: <518d94ee0809030407p22a34cai359e2594a92e0d0a@mail.gmail.com> Message-ID: <61FA3A78-7026-4CA9-B841-666DB214FCF5@mimectl> An HTML attachment was scrubbed... URL: From jabapyth at gmail.com Fri Sep 5 13:13:46 2008 From: jabapyth at gmail.com (Jared Forsyth) Date: Fri, 5 Sep 2008 06:13:46 -0500 Subject: [PythonCE] demo PythonCE/SDL app In-Reply-To: <518d94ee0809030407p22a34cai359e2594a92e0d0a@mail.gmail.com> References: <518d94ee0809030407p22a34cai359e2594a92e0d0a@mail.gmail.com> Message-ID: <9a5375240809050413oa5a9333gd512598dd05ca76f@mail.gmail.com> very nice! On Wed, Sep 3, 2008 at 6:07 AM, Adam Walley wrote: > Hi, all. > > As promised, here is a link to what I have created so far: > > watersprite.awardspace.com/python > > It is a work in progress, but all comments and suggestions are welcome > (preferably constructive ones!). > > I have also had some success in using PPYGUI to call the SDL functions, so > I can add an 'exit' button for example. > At the moment, the SDL screen needs a window in the background otherwise > things start to get messy, because Windows accepts input for other running > applications. You can see this effect, by renaming the script with the .pyw > extension (SDL does not trap the input, and Python has no window open to do > it - that's bad). > > I would be interested to hear from Alex regarding his PIL library, as this > could perhaps be used to handle other image formats? > > Adam > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.delattre at enst-bretagne.fr Sat Sep 6 13:29:25 2008 From: alexandre.delattre at enst-bretagne.fr (Alexandre Delattre) Date: Sat, 06 Sep 2008 13:29:25 +0200 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: References: Message-ID: <48C26995.9010707@enst-bretagne.fr> Hi, Recently I've adapted the module osce.py to use ctypes instead of win32* modules. Currently there is no os.system function but a systema function that can be used this way: systema('\\full\\path\\to\\program.exe', ['arg1', 'arg2', ...]) Cheers, Alexandre -------------- next part -------------- A non-text attachment was scrubbed... Name: osce.py Type: text/x-python Size: 1547 bytes Desc: not available URL: From adam.walley at gmail.com Sat Sep 6 18:22:52 2008 From: adam.walley at gmail.com (Adam Walley) Date: Sat, 6 Sep 2008 17:22:52 +0100 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: <48C26995.9010707@enst-bretagne.fr> References: <48C26995.9010707@enst-bretagne.fr> Message-ID: <518d94ee0809060922k4812c7f5if6e4beea6b57560e@mail.gmail.com> Hello, Just thought I'd put my two cents in... Igor, have you tried the os.startfile('\mypath\pyprog.exe', 'myAction') command? Where action is normally 'open', but could be 'print' or some other option. It does not give you a reply from the external program, but launches it as if you had clicked on it from the File Explorer, and it immediately returns to python. The only problem is that PythonCE might lose focus. Alex, thanks for the osce file. Adam 2008/9/6 Alexandre Delattre > Hi, > > Recently I've adapted the module osce.py to use ctypes instead of win32* > modules. > > Currently there is no os.system function but a systema function that can be > used this way: > > systema('\\full\\path\\to\\program.exe', ['arg1', 'arg2', ...]) > > Cheers, > Alexandre > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor_kaplan at hotmail.com Sun Sep 7 13:27:01 2008 From: igor_kaplan at hotmail.com (Igor Kaplan) Date: Sun, 7 Sep 2008 07:27:01 -0400 Subject: [PythonCE] Can I execute external programs from PythonCe? In-Reply-To: Message-ID: Thanks Alexandre and all for the help. The os.StartFile and os.systema are exactly what I needed, specially since systema takes arguments. Thanks so much. ---------------------------------------------------------------------- Date: Sat, 06 Sep 2008 13:29:25 +0200 From: Alexandre Delattre Subject: Re: [PythonCE] Can I execute external programs from PythonCe? To: pythonce at python.org Message-ID: <48C26995.9010707 at enst-bretagne.fr> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Hi, Recently I've adapted the module osce.py to use ctypes instead of win32* modules. Currently there is no os.system function but a systema function that can be used this way: systema('\\full\\path\\to\\program.exe', ['arg1', 'arg2', ...]) Cheers, Alexandre -------------- next part -------------- A non-text attachment was scrubbed... Name: osce.py Type: text/x-python Size: 1547 bytes Desc: not available URL: From eckhardt at satorlaser.com Tue Sep 23 10:29:48 2008 From: eckhardt at satorlaser.com (Ulrich Eckhardt) Date: Tue, 23 Sep 2008 10:29:48 +0200 Subject: [PythonCE] Porting to VC8/CE6 Message-ID: <200809231029.48611.eckhardt@satorlaser.com> Greetings! I'm currently trying to compile under VC8/VS2005 for a CE6-based device and I'm hitting a few roadblocks I'd like to have your opinion on. 1. It says PythonCE 2.5, does that mean it is based on Python 2.5? I didn't see this clearly stated anywhere, just asking for confirmation. 2. In pythonce.c, python25.dll is loaded explicitly (using LoadLibrary), why? Not only does this hardcode the path to the DLL (I would have used the path to the executable as a base instead) but I don't even understand why that is done instead of linking the DLL directly. 3. Again, in pythonce.c, it uses , which is not available on the target platform. I first tried to deactivate the few calls, but then ended up with further errors from SIP, and all that isn't helped by me not understanding thoroughly what the code does. If anyone wants to give it a try, too, I can send the SCons file to setup the environment for compilation. At least compiling python25.dll already works with it (though it requires some modifications to the sources, about which I'm not 100% sure yet). Otherwise, where are the sources? I assume that you have some kind of version control system, but Sourceforge's SVN repository is blank and the code I found in the CVS repository is not what is otherwise distributed. I'm a bit confused... cheers Uli -- Sator Laser GmbH Gesch?ftsf?hrer: Thorsten F?cking, Amtsgericht Hamburg HR B62 932 ************************************************************************************** Visit our website at ************************************************************************************** Diese E-Mail einschlie?lich s?mtlicher Anh?nge ist nur f?r den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empf?nger sein sollten. Die E-Mail ist in diesem Fall zu l?schen und darf weder gelesen, weitergeleitet, ver?ffentlicht oder anderweitig benutzt werden. E-Mails k?nnen durch Dritte gelesen werden und Viren sowie nichtautorisierte ?nderungen enthalten. Sator Laser GmbH ist f?r diese Folgen nicht verantwortlich. ************************************************************************************** From adam.walley at gmail.com Wed Sep 24 14:26:52 2008 From: adam.walley at gmail.com (Adam Walley) Date: Wed, 24 Sep 2008 13:26:52 +0100 Subject: [PythonCE] pygameCE / SDL question Message-ID: <518d94ee0809240526n5a34835fj7ff81abfb353b47d@mail.gmail.com> Hi, all. Apologies if this post is a little off PythonCE topic, but I am not sure where in the SDL groups I might send it. I thought Rene might have some ideas? Having had some success in getting some basic things working using PythonCE and the SDL library, I decided to persevere. Having recently started using VS2008, I was finally able to get the SDL library for winCE compiled. My previous tests all work with this new library (now version 1.2.13), and at least I know what functions have been included and should be available to PythonCE. My question is about what happens when an SDL window is initialised. Previously, using the knakos library, I was able to initialise a window which did not occupy the entire screen. However, using my new library, it seems that I am forced to use fullscreen only. This is perhaps not such a great problem for most pygame applications, but it really bugs me that the "non-fullscreen" method no longer works. I think that the knakos library uses some 'tricks' to allow the SDL screen to be defined as any rectangle within the device's display. Could somebody explain, how this is achieved, and how much work might be involved in modifying my 'vanilla' library to do the same? Adam. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.walley at gmail.com Wed Sep 24 20:17:12 2008 From: adam.walley at gmail.com (Adam Walley) Date: Wed, 24 Sep 2008 19:17:12 +0100 Subject: [PythonCE] pygameCE / SDL question In-Reply-To: <9a5375240809241101j61d74b49kfc56175c996bf4eb@mail.gmail.com> References: <518d94ee0809240526n5a34835fj7ff81abfb353b47d@mail.gmail.com> <9a5375240809241101j61d74b49kfc56175c996bf4eb@mail.gmail.com> Message-ID: <518d94ee0809241117l60807bb4qa43f0ad40a9eb1a8@mail.gmail.com> Hi, Jared. No, no changes. I simply compiled using the Visual files supplied in the download. I then ran my demo sliding tile app (exactly the same script with a single change to point to the new DLL) and it all works, but in fullscreen only. That is why I suspect there may be some 'adjustments' made to the knakos library, or possibly the newer SDL version has changed some of its default behaviour. Which version did you compile? The knakos one is 1.2.6, and my latest one is 1.2.13. Adam. 2008/9/24 Jared Forsyth > I've compiled a version of SDL (granted, its not the latest one) -- but > non-fullscreen works out of the box. Did you make any modifications to the > core library in porting it? > > On Wed, Sep 24, 2008 at 7:26 AM, Adam Walley wrote: > >> Hi, all. >> >> Apologies if this post is a little off PythonCE topic, but I am not sure >> where in the SDL groups I might send it. I thought Rene might have some >> ideas? >> >> Having had some success in getting some basic things working using >> PythonCE and the SDL library, I decided to persevere. Having recently >> started using VS2008, I was finally able to get the SDL library for winCE >> compiled. My previous tests all work with this new library (now version >> 1.2.13), and at least I know what functions have been included and should be >> available to PythonCE. >> >> My question is about what happens when an SDL window is initialised. >> Previously, using the knakos library, I was able to initialise a window >> which did not occupy the entire screen. However, using my new library, it >> seems that I am forced to use fullscreen only. This is perhaps not such a >> great problem for most pygame applications, but it really bugs me that the >> "non-fullscreen" method no longer works. >> >> I think that the knakos library uses some 'tricks' to allow the SDL screen >> to be defined as any rectangle within the device's display. >> >> Could somebody explain, how this is achieved, and how much work might >> be involved in modifying my 'vanilla' library to do the same? >> >> Adam. >> >> _______________________________________________ >> PythonCE mailing list >> PythonCE at python.org >> http://mail.python.org/mailman/listinfo/pythonce >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eckhardt at satorlaser.com Fri Sep 26 13:57:11 2008 From: eckhardt at satorlaser.com (Ulrich Eckhardt) Date: Fri, 26 Sep 2008 13:57:11 +0200 Subject: [PythonCE] Python on Windows CE/x86 In-Reply-To: <42DD1B67-E914-4124-8E4F-8589BA950B05@gmail.com> References: <64AC6A1A-730D-4FF0-8738-3C0AAC291B5A@gmail.com> <200809260909.49671.eckhardt@satorlaser.com> <42DD1B67-E914-4124-8E4F-8589BA950B05@gmail.com> Message-ID: <200809261357.11901.eckhardt@satorlaser.com> On Friday 26 September 2008, Roberto Aguilar wrote: > Do you have any suggestions for getting Python compiled on x86? > Almost everything I have found is for getting it compiled on ARM. Any > suggestions are helpful. Okay, in general I would suggest you first try to compile for Pocket PC 2003 first, since that seems to be the most widely supported one. Once you have that working, I'd change to compiling for x86. Now, for compiling, I basically followed the instructions included: - install Python 2.5 - open a terminal window and CD to PCBuild/WinCE - run 'scons.bat' As far as switching to x86 is concerned, there are several places to adjust: 1. msevc.py - replace /machine:ARM with /machine:x86 - replace clarm with cl or clarm.exe with cl.exe - replace in CPPDEFINES "ARM _ARM_ ARMV4I" with "x86 _x86_" 2. SConstruct - replace 'POCKET PC 2003' with your SDK's name (see path under ProgramFiles/Windows CE Tools/...) - replace 'WCE ARMV4I' with 'WCE x86' - replace 'PPC_2003' with something else (ATM, I have simply skipped the whole CAB-file generation). > I also understand you are just starting, so if you do learn anything > along the way, the info is much appreciated. I typically post updates to the mailinglist of such projects, so stay in touch with python-dev or pythonce. That's also why I put the PythonCE mailinglist in the CC, keep any discussions there to get a wider audience. Uli -- Sator Laser GmbH Gesch?ftsf?hrer: Thorsten F?cking, Amtsgericht Hamburg HR B62 932 ************************************************************************************** Visit our website at ************************************************************************************** Diese E-Mail einschlie?lich s?mtlicher Anh?nge ist nur f?r den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empf?nger sein sollten. Die E-Mail ist in diesem Fall zu l?schen und darf weder gelesen, weitergeleitet, ver?ffentlicht oder anderweitig benutzt werden. E-Mails k?nnen durch Dritte gelesen werden und Viren sowie nichtautorisierte ?nderungen enthalten. Sator Laser GmbH ist f?r diese Folgen nicht verantwortlich. **************************************************************************************