Re: [PythonCE] DLL hourglass in ctypes

2008-08-12 Thread Christopher Fairbairn
Hi,

On Wed 13/08/08 05:43 , "Adam Walley" [EMAIL PROTECTED] sent:
> My question is about the hourglass which appears on the screen while
> my script is running (in WM5 it's actually not an hourglass, but a
> kind of circular dial with windows colours).

This is caused by a design decision from the original Windows CE port of Python.
The core executable displays a wait cursor and then waits for the internal shell
script (pcceshell.py) to load. One of the first things the shell script does is
turn off the wait cursor by calling back into the native C code.

If you run a script or do anything else which causes the python shell not to
load, the cursor won't be hidden. Libraries such as ppygui "resolve" this by
explictly hiding the wait cursor as part of their own initialisation process.

They use code along the lines of:

   import _pcceshell_support
  _pcceshell_support.Busy(0);

I haven't liked this, since it means each library needs to be aware of something
PythonCE specific. For cleaness I think the native C part of the Python
interpreter can (and should) take care of this.

Three options I experimented with were

1) Removing the wait cursor entirely if the PythonCE executable was being 
started
to run a specific script (didn't work too well, depending upon the size of your
script this meant the user was presented with no visual que that anything was
happening for a long period of time).

2) Modifying the script loading mechanism in pythonce.c so the native C code is
aware once the script has been parsed, but hasn't started execution and have it
explictly turn off the wait cursor before handing control over to the python 
code.

3) Always load the shell (even if PythonCE is started to run a specific script),
then launch the user script by simulating the user entering a call to the
execfile function.

If anyone is actively working on the core interpreter I would be happy to share
more detailed thoughts.

Hope it helps,
Christopher Fairbairn

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] pygame / distutils

2008-07-25 Thread Christopher Fairbairn
Hi,

On Sat 26/07/08 05:13 , "Adam Walley" [EMAIL PROTECTED] sent:
> - is there already a way to get distutils working with PythonCE?

There has been recent discussions about this, but at current I don't bieleve 
there is anything available.

With respect to SDL and pygame it should be fairly easy to get the various 
python modules compiled. There have been a couple of 
releases built for PythonCE in the past and I've personally compiled from 
source a couple of times.

The SDL project has an additional ZIP file that contains Windows CE (Pocket PC) 
compatible project files that will allow you to 
build a suitable dll.

If you look at the distutils based installation files for the pygame 
distribution you can determine which source files need to be 
compiled into the various python modules (*.pyd). What I did was then manually 
create project files for Visual Studio to build 
these DLLs (you will need a source release of PythonCE itself for this, as to 
build a module you will require the python header 
files).

Once I had all the pygame dlls compiled it was then simply a matter of copying 
them to the correct folder on the PDA. There was no 
registry settings etc involved.

One thing to keep in mind is that some of the sample apps within the Pygame 
distribution won't work on a PDA without minor 
modifications. For example they commonly request a window size which is larger 
than the PDA's screen, and don't account for the 
lack of current working directory support when specifying file names for bitmap 
resources etc.

Hope this helps,
Christopher Fairbairn

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] The State of Affairs

2008-07-15 Thread Christopher Fairbairn
Hi,

On Wed 16/07/08 09:15 , Brad Clements [EMAIL PROTECTED] sent:
> Plus some things about CE were just too difficult to workaround, 
> requiring lots of C macros that weren't not appealing to core developers:

Over the last year and a half or so I have been inspired occassionally to look
into cleaning up the existing patch.

It's non trivial however especially if you want concepts such as an emulated
current working directory to be exposed to external libraries such as the SDL
graphics and Berkeley DB ones. This would be required if you want the broadest
script compatability between desktop and PDA versions of Python.

If anyone is interested in having a shot I would be willing to discuss my
thoughts and experiments in this area to get you started. There seems to only be
minimal development occuring within PythonCE (who is actively working on the 
main
pythonce.exe at the moment?) and I don't have enough time to commit to the 
project.

Thanks,
Christopher Fairbairn


___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] reading GPS?

2008-07-08 Thread Christopher Fairbairn
Hi,

On Wed  9/07/08 12:58 , Justin Mitchell [EMAIL PROTECTED] sent:
> Thanks for the info. I think the serial approach would suit me better. 
> However... I don't think the GPS control panel exists on my phone (there 
> was no GPS Settings registry key). I wonder if MS removed it in WM 6.1.
> 
> Do you know if these settings can be specified manually?

Sorry I didn't switch gears between Windows Mobile Standard and Windows Mobile
Professional before posting.

Indeed Windows Mobile Standard (i.e. Smartphone) devices do not have the GPS
settings app.  This is a feature present within Windwos Mobile Professional or
Classic (commonly refered to as Pocket PC) devices.

If you have installed the Windows Mobile SDK on your PC there is a executable
called settings.exe available within C:\Program Files\Windows Mobile 6
SDK\Tools\GPS (or equivalent path on your machine) which provides a similiar
feature once you've transfered it to your phone.

I am not familair with the make/model of phone you are using, but perhaps the
following thread will also be of help you determine the correct COM port for 
your
device -
http://www.modaco.com/content/smartphone-standard-news/262137/motorola-q9h-at-t-gps-activated-updated/

Hope this helps,
Christopher Fairbairn

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] reading GPS?

2008-07-08 Thread Christopher Fairbairn
Hi Justin,

On Wed  9/07/08 11:47 , Justin Mitchell [EMAIL PROTECTED] sent:
> Any suggestions on where to get started on reading GPS coordinates? 
> Would these be read through the serial interface? I have a Motorola Q9C 
> Smartphone.

One approach (if you don't mind being Windows Mobile dependant) is to use ctypes
to interface to the GPS Intermediate Driver (documented on MSDN at
http://msdn.microsoft.com/en-us/library/ms850332.aspx).

This approach would take care of NEMA sentance parsing etc and give you a
structure with current lat/long and speed etc.

Alternatively you can also go the serial port route. In that case you can use 
the
GPS control panel applet to determine which COM port you should read from. See
http://blogs.conchango.com/kenibarwick/archive/2006/03/19/3119.aspx for more 
details.

Hope this helps,
Christopher Fairbairn
Microsoft MVP - Device Application Development
http://www.christec.co.nz/blog/

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Is pythonCE only for ARM processors

2008-04-27 Thread Christopher Fairbairn

Hi,

On 24/04/2008, at 4:01 PM, Rohan Smith wrote:
I have installed WinCE6 on an x86 embedded system, Does pyrthon  
support x86 architectures, since I realize most PDA/Handhelds use  
ARM Processors


The releases on the sourceforge website are for Windows Mobile based  
devices and hence ARM architecture only.


There have been a couple of un-official Windows CE (non aygshell  
enabled) and X86 releases made at various times. But I wouldn't know  
where to point you with respect to downloading one.


It's fairly each to switch the source to build for X86 instead of  
ARM, from memory the only major change required is to switch the  
libffi library back to the X86 version. If your platform doesn't have  
the aygshell support included there is also a small amount of GUI  
editing required to use standard Windows CE style menus etc.


Mainly the lack of X86 realeases has been due to lack of interest /  
support in such a build. If your Windows CE device has command shell  
support it is even possible to build the standard python executable  
(with it's command line support etc).


Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Installing PythonCE

2008-04-07 Thread Christopher Fairbairn
Hi,

On Tue Apr  8  6:45 , Frédéric Mantegazza sent:
>I had troubles installing PythonCE on my Ipaq 2100: every .exe installer 
>failed ("xxx is not a valid PocketPC app"); only the CAB file installed 
>correctly.

No you are not missing anything.

The CAB file is designed for installation directly on the PDA, while the *.exe 
installer is designed to be run on your Desktop PC (hence the error that it's 
not a 
valid Pocket PC app).

The *.exe will register the nesscary cab files with ActiveSync so that PythonCE 
is 
automatically installed onto your connected PDA (and can be found in 
ActiveSync's 
Add/Remove Programs menu item). Essentially it downloads the CAB file via 
ActiveSync and then automatically installs it.

Hope this helps,
Christopher Fairbairn

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] 2.6 update

2008-03-22 Thread Christopher Fairbairn
Hi,

On 23/03/2008, at 5:07 AM, Alexandre Delattre wrote:
> Btw, I have a suggestion to make compiling/porting C extension  
> modules easier in future PythonCE builds:
>
> Indeed, the functions implemented in wince_compatibility.c are not  
> available from a C extension module.
>
> Using the __declspec(dllexport) notation for these function would  
> allow extensions to dynamically link with them, and benefit for  
> instance of proper errno and current directory support.

While Joseph has been concentrating on getting a Python 2.6 merge up  
and running I have been working on some related things to hopefully  
make a future merge into the Python trunk more acceptable/easier.

One of them is essentially the changes you suggest above. With a few  
additional modifications it helps reduce the number of #ifdef  
MS_WINCE required through the core Python source code, and it makes  
them not only available for extension modules but also other  
supporting libraries such as libsdl etc.

I'm particularly keen to get the SDL graphics library compiled with  
access to Python's concept of a current working directory etc, as  
this will mean a lot of pygame based projects will run on PythonCE  
without major changes. Using the existing pygame/libsdl ports  
requires all file paths to be replaced with full paths to any graphic  
or sound resources etc. My changes to how wince_compatibility.c works  
means although libsdl will get access to Python's current working  
directory concept etc, it still doesn't have a direct dependency on  
PythonCE being installed (i.e. SDL still works without PythonCE  
installed).

The other change I have been experimenting with is a replacement of  
the SCONS based build system for PythonCE. The Win32 desktop versions  
of Python are currently built via a series of Visual Studio 2008  
project files. I have started writing a little script that converts  
these project files so that they build for Pocket PC 2003 (in a  
similar fashion to an existing script which converts the VS2008 files  
into a format compatible with VS2005). My progress seems to be going  
well.

My hope is that if we can start building using the same process as  
the desktop it will be easier to get the changes submitted upstream.  
Any changes the core Python developers make to how Python builds for  
the desktop would instantly be reflected in the PythonCE build  
process. This also helps resolve some of the differences that  
currently occur between the desktop and PythonCE builds.

How many people are currently building PythonCE with Embedded Visual  
C v4? One thing Joseph and myself have been thinking about is further  
developing the work I have been doing to produce a script that would  
convert the VS2008 based project files into a format compatible with  
Embedded Visual C. This isn't of particular interest to me (as I have  
been using Visual Studio to build PythonCE for quite a while), but I  
do realise that unlike for the desktop there isn't a free version of  
Visual Studio that is capable of developing PDA applications.

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] trunk merge?

2008-03-18 Thread Christopher Fairbairn
Hi,

Does anyone have an idea on what some of the issues surrounding earlier 
attempts/investigations at 
merging the PythonCE specific changes into the main Python trunk were?

I can have a guess at what a couple of these may be, but it would be handy to 
keep these things in 
mind if a more increased development effort starts to build around the PythonCE 
port.

I have a couple of ideas on things that we could do to reduce the size of our 
diff, and to reduce the 
amount of "core" Python code we touch which may help any eventual patch be 
accepted.

I also like the idea of having a place in SVN for third party libraries. I have 
a couple of small 
patches to libraries such as pygame to make them more usable/compatible with 
the PythonCE port. It 
would be nice to have these in revision control before being able to push the 
changes upstream. Would 
that be the intention for that directory?

Thanks,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] developers inquiry

2008-03-17 Thread Christopher Fairbairn
Hi,

On Tue Mar 18 13:39 , Ron Guerin <[EMAIL PROTECTED]> sent:
>At least not at SourceForge.  There is a CVS repo there though.

Unless it has changed recently the CVS repository is significantly out of date. 
I don't 
think it matches up with any of the previous 3 or 4 releases.

The only reliable way to get the source is via one of the source ZIP files made 
as part of 
each release.

If anyone is interested in merging some patches I have some that I could 
probably find and 
clean up a little. I changed the build scripts so that PythonCE could also 
build via Visual 
Studio 2005 or 2008 if these tools are detected on the build machine, had 
support for X86 
Windows CE devices (as well as ARM devices) and had a number of small UI 
changes in progress.

Hope this helps,
Christopher fairbairn
Windows Mobile Development blog - http://www.christec.co.nz/blog/
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] developers inquiry

2008-03-17 Thread Christopher Fairbairn
Hi,

On Tue Mar 18 13:10 , Joseph Armbruster <[EMAIL PROTECTED]> sent:
>I was recently added as a developer to PythonCE on SF.  I am attempting to 
>find 
>the subversion repository for PythonCE but have had no luck at all.  Can 
>anyone 
>point me in the right direction?

I don't think there is one. I am not aware of one anyway.

One or two minor releases on SourceForge last year were made by me (adding very 
initial Smartphone support for example). I didn't try to add the changes to a 
source 
control repositry etc as it seemed one would need to be created from scratch. I 
didn't really know who was in charge or control of the direction of the 
PythonCE 
project and didn't want to step over my authority etc.

Since then I haven't had too much personal time to spend on the project. I do 
have a 
few additional patches floating around somewhere...

This is compounded by the fact that there doesn't seem to be an active 
development 
effort surrounding the port. Since I submitted my last set of patches I've only 
had 
one person offer to help, and they "disappeared". I don't have the time to 
invest to 
make a fully polished port by myself.

I would potentially be interested in giving you a helping hand (I am an expert 
in 
Windows CE / Windows Mobile development) if you do setup a SVN repository 
somewhere 
and managed to get a more active development process going.

Hope this helps,
Christopher Fairbairn
Windows Mobile Development blog - http://www.christec.co.nz/blog/
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Python-2.5-20071004 vs Pocket PC 2003

2007-12-20 Thread Christopher Fairbairn
Hi,

On Fri Dec 21  3:53 , Ronald Oussoren  sent:
>De description for the  Python-2.5-20071004 download on SF says that  
>this version will run on "any Windows Mobile 2003 or higher device".   
>I'm trying to run this on device that claims to run "Microsoft Pocket  
>PC 4.20.0 (Build 14053)", and on that device the OS claims it cannot  
>run python (using a generic message about possibly missing  
>components).  The 2006 build works fine on that system.

Sorry this is possibly true. However I am currently away on holiday without 
much 
internet connectivity so can not completely determine this as the case.

>From memory one release I made accidentally had the requried OS version set as 
4.21 (i.e. Windows Mobile 2003 Second Edition), meaning the executables 
wouldn't 
run on plain Windows Mobile 2003 devices.

I didn't pick this up until it was released as I don't have any 2003 powered 
devices, and the emulators for 2003 run Windows Mobile 2003 Second Edition.

Perhaps in the new year, once I get back from holiday there may be a new 
release. 
I'll fix up this issue at that stage although I may need some help in testing 
it.

Sorry,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] How does one build PythonCE?

2007-12-13 Thread Christopher Fairbairn
Hi,

On Fri Dec 14  1:47 , Ronald Oussoren <[EMAIL PROTECTED]> sent:
>We recently switched to MS Visual Studio 2005 and now I'm wondering  
>how to build a fresh Python binary using that.  I've download the  
>source patches from SF.net and applied those to the head of Python's  
>release25-maint branch.  I then build using 'scons.bat' in the PCbuild/ 
>WinCE directory which, after some patching, results in an executable.  
>So far, so good.

I've got some patches to msevc.py so that the build should autodetect the 
presence 
of either EVC or Visual Studio 2005 (or 2008) and configure the build process 
correctly. I just haven't had time to tidy them up and publish them. Maybe I'll 
get 
some time over the Christmas break. 

Would you be keen of giving these patches a "beta test" on your system once 
I've 
got them ready?

Likewise if you have any patches to allow building against release25-maint I'd 
be 
interested in combining them with my current improvements to the port.

>That doesn't include the sqlite extension though, and when I use  
>'scons.bat cab' I get an error about not finding the sqlite3 header  
>files. The reason for that is obvious, the solution is less so. The  
>build complains because I have to download the sqlite sources and  
>store them somewhere, but I have no idea where they should be stored.  

The download of PythonCE source code would have placed the source in a 
directory 
called "Python-2.5". You need to place the sqlite-ce source code in a directory 
beside this folder (i.e. the main folder has both a Python-2.5 and Sqlite 
subfolder). The name it should have depends upon the exact version of sqlite 
your 
PythonCE source code has been hardcoded for. For my current branch I need to 
place 
it into a directory called sqlite-source-3.3.5-wince.

The exact path can be determined by opening up the SConstruct file. It should 
have 
a line containing a line like the following:

sqlite_source = '#../../../sqlite-source-3.3.5-wince'

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Embedded PythonCE

2007-10-21 Thread Christopher Fairbairn

Hi,

On 22/10/2007, at 12:46 PM, Stefan Rusek wrote:
Has anyone experimented with embedding PythonCE in C code and run  
it one WM?


I haven't tried but don't imagine you would find too many  
difficulties doing this. The main python25.exe within the PythonCE  
releases is doing exactly that.


Python25.exe is a thin GUI wrapper over top of the core python  
interpreter which lives within python25.dll. Python25.exe is using  
the standard Python embedding APIs to host the interpreter.


See the online python docs (in particular the "Embedding Python in  
Another Application" section - http://www.python.org/doc/ext/ 
embedding.html) for further details on how to do this.


I would be interested to hear any feedback related to this  
functionality within PythonCE. In theory all you need to download  
from the PythonCE website is the "developer" zip file which includes  
the header and lib files required to build your application.


Hope this helps,
Christopher Fairbairn___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] General questions

2007-10-20 Thread Christopher Fairbairn
Hi Frédéric,

On 21/10/2007, at 3:56 AM, Frédéric Mantegazza wrote:
> 1) My first question is: how do you develop? Do you write python  
> scripts on
> your PC, and then download them to the PocketPC? Is it also  
> possible to
> edit the script on the PcoketPC? Is it possible to download the  
> scripts
> from Linux?

I typically develop on my desktop PC and transfer the scripts for  
testing to the PDA. Many of my scripts are usable on both platforms  
so I find it easier to test and debug on my desktop before  
transferring to the PDA.

Sometimes I use the remote-console project available from http:// 
ctypes-stuff.googlecode.com/svn/trunk/wince/remote-console/ to avoid  
the manual download step. Basically this allows you to run a script  
on your desktop (console.py) and it will give you the main PythonCE  
interpreter interface on your desktop PCs terminal window, executing  
the code directly on your PDA etc. It's useful for debugging small  
snippets of code.

A range of tools that allow you to create programs directly on your  
PDA are listed on the PythonCE wiki at http:// 
pythonce.sourceforge.net/Wikka/Tools

> 3) Which PocketPC do I need to run PythonCE? It is maybe more a  
> WindowsCE
> version issue, so which version?

The existing versions available for download from the Sourceforge  
downloads page (especially the python-smartphone release) should work  
on any Pocket PC 2003 or above device (i.e. 2003, 2003 Second  
Edition, Windows Mobile 5.0 or Windows Mobile 6 based). It should  
also work on Smartphone devices running a similar range of operating  
systems (in case you didn't know, Microsoft has two slightly  
different variants of it's PDA OS, one for Pocket PC PDAs, and  
another for Smartphone devices which lack a touch-screen).

The existing releases should also run on devices which use the raw  
Windows CE operating system without the Pocket PC extras and  
modifications. It should run on any ARM based Windows CE device  
running Windows CE .NET 4.20 or above.

You may also be able to find versions capable of running on older  
devices, but these will generally be older releases of Python.

A release with support for X86 based Windows CE devices among other  
features is coming soon.

> Is serial port availabe on all Pocket PC,
> or only (like for Palm) on old models?

The availability of a serial port is highly specific on the make/ 
model of Pocket PC device you purchase. There is no standard which  
specifies a serial port must be present, unlike some of the other  
features of Pocket PC devices which are requirements for OEMs to  
implement in order to call their device a Pocket PC.

 From my experience it is becoming harder to find devices with  
physical RS232 serial ports. Bluetooth seems to be much more  
universally available these days if using a bluetooth dongle or  
adapter for your display unit is an option.

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] How do I run programs when screen is off

2007-10-18 Thread Christopher Fairbairn
Hi Knic,

On 17/10/2007, at 9:23 PM, knic knic wrote:
> I am running the PythonCE release pythonce-2.5-20071004 on a WM 6  
> phone. I was
> wondering how do I enable python programs to run and not sleep when  
> the
> screen is turned off?

Are you using a Windows Mobile 6 Standard (i.e. non touchscreen), or  
Windows MObile 6 Professional (i.e. touchscreen enabled) device?

I assume by screen turning off you are actually talking about the  
entire device turning off and the power button needing to be pressed  
to turn it back on. There is actually an "unintended" state a device  
could get into where the screen is off, but the CPU is still running,  
but since you say your application stops running I am assuming the  
entire device is powering down.

If using a Windows Mobile 6 Professional device the answer is to use  
the ctypes module to periodically call an operating system API called  
SystemIdleTimerReset. This API is documented within MSDN at http:// 
msdn2.microsoft.com/en-us/library/ms941840.aspx, basically each time  
you call this function it resets a timer. If the timer is not reset  
and expires the device suspends. So by calling the function  
periodically within a main loop of your program etc the device  
shouldn't turn off.

I don't have a code example for doing this on hand, but could  
probably sort something out if you are interested in this technique.

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE on Smartphone (WM6)

2007-10-17 Thread Christopher Fairbairn
Hi Jorgen,

On 17/10/2007, at 7:29 AM, Jorgen Bodde wrote:
> Thank you for your answer, I guess I need to find a port of wxWidgets
> / wxPython or some kind that targets the mobile platform better, or
> instead use the Embedded Visual Studio with .NET. I love Python so I
> hope there is a better alternative for the smartphone.

I personally have been using vensterce (http://sourceforge.net/ 
projects/vensterce) as my GUI toolkit.

It is a very thin wrapper over top of the Win32 GUI APIs provided by  
the operating system. This coupled with some of the API documentation  
that explains how to create spinbox style lists and expandable edit  
controls (http://msdn2.microsoft.com/en-us/library/ms832344.aspx)  
works reasonably well for me.

However even this vensterce (out of the box) doesn't abstract these  
kinds of UI differences. It is something I am contemplating  
contributing to the vensterce project at some stage...

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Python CE port for Windows CE.Net 5.0 x86 processor

2007-10-16 Thread Christopher Fairbairn
Hi Patrick,

On Wed Oct 17  1:04 , "Patrick Lammens"  sent:
>Starting from your port PythonCE-2.5-20061219-source.zip,
>I've been able to port Python 2.5 to Windows CE
>for use on Windows CE.Net 5.0 platform, with an
>x86 processor.

That is very exciting news and great timing!

I have been working on an updated PythonCE release (you can see the initial 
stages of 
this within the downloads page as the new pythonce-smartphone release). My 
initial 
efforts have been making a release which works better on newer Windows Mobile 
devices (as 
well as supporting optionally building with VS2005).

I would be interested in merging your patches with my updated release and 
comparing notes 
on how we've both independantly modified the build system to use VS2005 etc.

In fact I was actually going to email the pythonce@python.org mailing list 
today to see 
how many people were using PythonCE within the "raw" Windows CE environment. I 
have some 
local changes designed to improve the support on Windows CE devices (i've 
removed the 
hard dependency on aygshell for example) but wanted to guage how many people 
were using 
such a release before going too far.

How many people on this mailing list are using PythonCE within a Windows CE 
environment 
which is not Windows Mobile Pocket PC or Smartphone based?

Are you able to email your patches to me? I would be keen in rolling them into 
my next 
release (I am keen to get one source tree with all active development happening 
within 
it).

If you could send me a CAB file for the X86 build I could also probably get it 
uploaded 
to the website in the mean time.

Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE on Smartphone (WM6)

2007-10-15 Thread Christopher Fairbairn
Hi Jorgen,

On Tue Oct 16  5:37 , "Jorgen Bodde"  sent:
>I have PythonCE 2.5 and TKinter running on my smartphone. I wrote a
>minimal app and I see a dialog with a button, but since it is a
>smartphone which does only have number keys and a jog dial to control
>the input, the window stays unresponsive to input. I cannot even set
>the focus to a control.

In general smartphone programming is slightly different from programming for a 
standard Pocket PC device.

As you mentioned the first issue you typically come across is the lack of 
ability 
to select a control. The solution to this is to programatically select the 
first 
control on your window when initialising it. The OS has support within the 
default 
window procedure to then allow the user to "tab" between controls when the up 
or 
down arrow keys are pressed.

A potentially larger problem with TKinter (a toolkit that I have no experience 
with) are issues around the standard controls such as combo boxes and buttons.

On a Windows Mobile smartphone standard controls such as a combo box are 
exactly 
the same as you would see on a Pocket PC device. This leads to usability 
problems, 
for instance with a combo box there is no way to drop down it's list without 
being 
able to click on the little arrow button to the side of the control, which you 
obviously can't do on most smartphones.

For this reason Microsoft suggests using a series of alternative controls. For 
example what you may think is a combo box within a smartphone application is 
probably a 1 line high listbox coupled with an up/down spinbox auto-buddy 
docked to 
its right.  Application frameworks such as the .NET Compact Framework generally 
abstract this different within their control classes, so an application 
programmer 
creates a "combobox" and the framework determines which set of native controls 
need 
creation to implement this.

I assume that TKinter probably hasn't been implemented with this kind of thing 
in 
mind.

Hope this helps,
Christopher Fairbairn

PS: Just thinking about it now I bieleve TKinter is a framework which 
essentially 
draws all it's own custom controls. If this is the case the problem is probably 
more involved, since you won't get the native OS support for selecting controls 
on 
a smartphone etc.

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] Issues with enter key within PythonCE main window

2007-10-14 Thread Christopher Fairbairn
Hi,

I have recently been given a bug report with the latest build of PythonCE.

The bug report has now also been added to the SourceForge website 
(http://sourceforge.net/tracker/index.php?
func=detail&aid=1813123&group_id=104228&atid=637340)

The issue is that on a Samsung SGH-i600 (Windows Mobile 6 Smartphone) device, 
pressing  the enter key doesn't cause PythonCE to process the entered line of 
input.

I am going to attempt to diagnose this problem later this week and give the 
submitter a small test application to attempt to verify what is going on.

I remember from reading the archives of this mailing list that there have been 
somewhat similiar issues in the past. From memory related to PythonCE not 
processing multi-line commands properly.

Does anyone have any suggestions on which areas of the code I should be looking 
into for these kinds of issues?

Thanks,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE 2.5 on a NEC MobilePro 900c?

2007-10-08 Thread Christopher Fairbairn
Hi Ron,

On Tue Oct  9 14:07 , Ron Stephens  sent:
>I would like to run Python on my WindowsMobile5 Motorola Q phone but  
>I gave up a yearago when I couldn't get it to  load.
>
>Maybe I should try the file you offer the link to?

You should definatly try out the version I referenced (pythonce-smartphone on 
the 
sourceforge downloads page).

Hopefully you will get further along with this build. The core essentials 
defiantly 
are working. It is still a work in progress though.

One thing I just fixed on my local copy for instance is the 'raw_input' 
implementation, the build I released on sourceforge displays a dialog box which 
can't be dismissed if you are using a smartphone.

I would be keen to hear your feedback. Although I am using it on my Windows 
Mobile 
5.0 Smartphone I do not have one with a qwerty keyboard, so would be keen to 
hear 
some feedback on how it behaves.

Thanks,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PythonCE 2.5 on a NEC MobilePro 900c?

2007-10-08 Thread Christopher Fairbairn
Hi, 

>> Are there any major hurdles in building a version of PythonCE 2.5 (and 
>> associated tools) that will run on my MobilePro (Windows CE 4.2)? By 
>> major, I mean more involved than tweaking the build. 

Is there much interest in a build which supports Windows CE devices? 

I recently released an updated version of PythonCE which has better Windows 
Mobile 
support (for smartphones and newer WM6 devices) - 
http://sourceforge.net/project/showfiles.php?group_id=104228&package_id=247631 

At one stage I had developed further patches to PythonCE which meant that the 
single executable/cab file would run on basically anything running Windows CE 
4.2 
or above without the need for dummy agyshells etc. In my biased opinion this 
was a 
better approach than using a dummy agyshell.dll because it meant the executable 
could detect it was running in a different environment and tweak the menu 
layouts 
etc to give a better fit. 

The patches have since been lost due to me loosing access to a raw Windows CE 
powered device to test on. 

I am looking at ways to drum up development support for PythonCE. How many 
people 
are using PythonCE on a Windows CE device? 

Thanks, 
Christopher Fairbairn 

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PyCrypto binaries

2007-07-27 Thread Christopher Fairbairn

Hi,

On 28/07/2007, at 5:05 AM, [EMAIL PROTECTED] wrote:


However, by experience, don't expect to be able to
run wx+pycrypto+numpy+whatever c extension at the same time unless you
have a very recent WM 6.0 device (it's a known problem of lack of
virtual adressing space for dlls, that has been expanded from 32 MB to
1 GB in WM 6.0 kernel).


Be very careful here.

Windows Mobile 6 devices still have the same 32MB process limit, as  
Windows Mobile 5.0 (or earlier) devices had.


The expanded addressing space is a feature of the Windows Embedded CE  
6.0 kernel. But Windows Mobile 6 devices are still using a Windows CE  
5.0 based OS kernel (v5.02 to be precise, compared to v5.01 which was  
used for Windows Mobile 5.0). Some features have been back ported  
into WinCE 5.02 from WinCE 6.0, but most of the major architectural  
differences still stand.


You will have to wait until Windows Mobile 7 (or whatever the next  
version is marketed as) for the Windows CE 6.0 kernel features to  
become available within Windows Mobile devices.


For a more complete explination see the blog posting titled "Is  
Windows Mobile 6 powered by Windows Embedded CE 6.0?" on my blog at  
http://www.christec.co.nz/blog/archives/18.


Hope it helps,
Christopher Fairbairn___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] Submitting patches / support for WinCE

2007-03-27 Thread Christopher Fairbairn
Hi,

Over the last few days I have submitted a few patches via PythonCE's 
sourceforge 
site. Hopefully there will be more to come in the future :-P

The question I have is in what format are patches ideally submitted etc. Each 
project tends to have it's own processes in place for submitting patches etc 
and I 
would like to know how I can make it easier for my patches to be accepted and 
merged.

The main patch I submitted a couple of days ago provides initial support for 
running on devices running the Smartphone variant of Windows Mobile. I would 
like 
to tidy up and submit another patch which will allow a single binary build to 
run 
on raw Windows CE, Pocket PC and Smartphone platforms without requiring dummy 
agyshell.dll's (and getting better Windows CE intergration in the process). Is 
this 
something which is likely to be accepted?

Thanks,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Building under Visual Studio 2005 for Devices

2007-03-08 Thread Christopher Fairbairn
Hi,

>If it is possible to modify the PCBuild8 project files so that Python can be 
>built for both desktop Windows and Windows CE then yes, this may well be the 
>simplest option. However, if Windows CE would require separate project files 
>then I think it would be better to adapt the SCons scripts.

I have had a quick play around with getting a build working using the Visual 
Studio 2005 compilers and have managed 
to get a version compiled on my machine via the SCons scripts. It appears to be 
running fine on my PDA.

A brief summary of what I needed to do.

1) Modified msevc.py to change some of the tool names (cl.exe vs clarm.exe) and 
command line arguments as required 
for the VS2005 compilers. At present I also hardcoded some of the file paths 
required rather than writing the code to 
reliably find them in the registry etc.

2) Tweaked a few conditional compile statements throughout the source code 
(about two or three from memory) due to 
the conditional expressions being incorrect due to the use of the VS2005 
compiler during WinCE builds. For instance, 
the following condition found within pythonrun.c is now slightly incorrect.

 /* Special signal handling for the secure CRT in Visual Studio 2005 */
 #if defined(_MSC_VER) && _MSC_VER >= 1400

This condition includes code which is specific to the desktop runtime 
environment (but now evaluates to true due to 
me using the same version of the compiler), so ideally it needs a further 
condition added to avoid it including the 
code when targeting the WinCE platform with this compiler version.

If I took the time to clean up and complete these patches would there be 
interest in including support for building 
PythonCE with Visual Studio 2005?

Thanks,
Christoher Fairbairn

PS: When I ran SCons it built the Python25.dll, Python25.exe and Python25.zip 
files. However it didn't build the cab 
file. I notice there is code within the 'SConstruct' file which appears to be 
designed to automate the cab building 
process (I manually ran cabwiz.exe on the inf file), how do I run this script?
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] Building under Visual Studio 2005 for Devices

2007-03-05 Thread Christopher Fairbairn
Hi,

I am keen to start contributing to the Windows CE/Windows Mobile port of 
Python. I 
have a lot of commerical development experience in this environment.

I would like to understand the build process for Python in a lot more detail 
than I 
currently do. I thought an ideal way to do this would be to have a goal of 
making 
PythonCE compilable under Visual Studio 2005.

Is anyone able to give me any starting tips on how I might approch this? Should 
I 
look at modifying the SCONS scripts to be able to detect and make use of Visual 
Studio 2005 instead of EVC, or should I go the route used by the PCBuild and 
PCBuild8 directories (i.e. desktop versions) where (I assume) someone has 
manually 
created a bunch of suitable project and solution files?

Thanks.
Christopher Fairbairn


___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce