Python CE 2.2+ for HPC Readme
Japanese Pages
Installation
1. Download zip file
2. Unzip and place files to somewhere.
(Ex. \Storage card\Python).
*** Keep the directry structure.
*** Python is a Case Sensitive language.
Please do not modify filename case during unzipping and copying.
Note. If you use CF or memory card, put Python in it to save main memory.
In HPC, Python runs happily from any directory.
3. If your directories doesn't correspond with default sys.path,
and if Python does not start,
modify the sys.path setting at the begining of 'site.py'.
4. Make a shortcut on desktop, and/or Startmenu if you want.
You may do this with the Explorer.
Go to the directory whrere you placed PythonCE22.exe,
and use File menu / Send / shortcut on desktop.
5. Associate .py and .pyc with the PythonCE if you want.
(A software called 'smalltweak' will do it for you.)
http://tillanosoft.com/ce/index.html
Please use these optional feature after you have successfully
started Python without them.
6. (Optional) To use input(), raw_input(), you have to use
modified version of pcceshell.py stored in the "Extra" directory.
Rename the standard pcceshell.py to "pcceshell-s.py" or something else.
Copy modified pcceshell.py from Extra directory to where you put
PythonCE22.exe.
Copy "alias.py" and "pyalias" to one of the directory (like "Lib")
specified in sys.path setting.
7. (Optional) To use execv() and related functions,
you need os.py and oscce.py in "Extra" directory.
Rename original os.py, then copy os.py and osce.py from "Extra"
directory to "Lib" directory.
8. (Optional) I have ported a module called 'calldll'.
This small module will let you call most of functions in any dll.
Great for quick proto typing or testing, and just interfacing with
other programs.
There is a 'dll.py' that wraps around calldll.py, too.
Please be careful using this module since you can access
lowlevel functions that have potential to crash your machine.
Current status
HPC2000 MIPS version is running without much problem.
It's fast enough (for me).
'testall.py' (regrtest) shows 78 tests OK,.24 tests failed, 37 tests skipped.
Pystone test varies time to time.(CE3.0 HPC2000 TX3922 MIPS clone with 32MB RAM,
512MB-CF + PCMCIA-LANcard free program memory = 5.2MB, free datamemory = 5MB )
>>> test.pystone.pystones()
(64.0, 156.25)
>>> !!
(48.0, 208.33333333333334)
HPC2000 ARM version is same Release build as MIPS.
Now, tested and it runs on Jordana720.
Still under testing stage, though.
What's new?
02/09/13 14:40
Revised Installing instruction and updated distribution files.
I put everything in one file for easier installation.
You don't have to copy "Extra" directory for standard operation.
You can delete "Lib/test" directory if you don't care about testing.
Similarly, Other "Lib/xxx" can be put aside.
Python will tell you when it does not find something needed, anyway.
Other changes:
I changed Icon and Dialog.
Now, you should see Python CE Icon on Task Bar and Alt-Tab box.
Also, I changed Help/About dialog box to include all the credit
mentioned in Pocket PC version.
Known bug: Help/About dialog fails to initialize in some occasion.
I have found out the cause, and I will fix sometime later
since it's not really major issue.
02/09/10 23:02
The problem around win32gui module on ARM version is fixed.
And I expect it to run as well as MIPS version.
02/09/08 11:05
Currently, it will not run into Interpreter console.
I'm working to fix some problems around win32gui.pyd
reported by a tester.
* You may have to place "site.py" into the root directory
if you are using Jordana 720.
Probably, same thing applies to the 'pcceshell.py'.
After setting the sys.path, all other modules can reside
anywhere you have included in sys.path.
** Older debug Build is discarded.
*** I call it 'Release Build' simply following the convention
for windows prgraming. It does not have all the debug information.
Still, I left symbol information just in case.
I will remove these debug info to make the software smaller
when it's no longer needed.
Thus, 'Release build' dose not mean that it is stable or work flawlessly.
02/09/08 10:31
Finally, I had a report for ARM version.
At this moment, we know that it has some problem that
it won't run into win32gui.
I'll fix this soon.
02/09/02 20:41
Newer, Release model build for HPC2000 ARM is there.
In addition, win32sys, win32sh, win32ras modules are added to
both MIPS and ARM zip file.
These zip files contain 'extra' directory as well.
I started to test calldll.pyd and it's wrapper dll.py on my MIPS machine.
By using dll.Dllfunc class, I could access functions without problem, so far.
Some bugs are removed from here and there, too.
I have updated souce file replacement pack for HPC2000.
I'll prbably build for CE2.11 HPC/Pro machines as a next step,
while testing and debugging what I have now.
Please let me know if ARM version works or not.
02/09/02 06:40
I've tested '/shell' option.
When you run PythonCE22.exe from StartMenu/Run or from batchfile,
you can specify which shell you want to use.
As a matter of fact, you can run any python script with this option.
Note that you must specify full path to the script file.
Ex \USBdisk\python22\pythonCE22.exe /shell \USBdisk\python22\anyscript.py
(Probably you can specify .pyc file, as well)
Since we can invoke any script from site.py or pcceshell.py,
personally, I won't be using this feature.
For the missing _socket module, I've found out that
config.c was the cause, and I fixed it.
Unfortunately, while doing thesse things, I accidently
updated all source files to the latest version from main CVS.
And I learned many things, again.
(It's very easy to update and merge source file using WinCVS.
Maybe a little too easy. And the result could be a mess.
Since many modificcations to the main CVS dose not bother about
CE specific problems, some of them have to be readapted for CE.
To avoid these kind of time consuming mistakes in building Python,
you may want to stick to the source tree Brad has made,
and make minimum modifications for HPC or CE2.11 related matter.)
Also, zlib modules is added. I'll run alltest.py later to check
overall improvement (or degradation).
execv() clone that I made with win32process, modified os.py osce.py
is restored, too.
For easier downloading,, I put everything you may need in a zip file.
Another news is, I started to build for ARM release version.
Now, PythonCE22.exe, Python22.dll, Pywintypes22.dll are ready.
I'm having trouble with win32event and win32gui, somehow.
Without win32 modules, it may not be so useful.
I think you can still use it for limited things by redirecting
stdout, stderr, and using default debug console.
If you want to build by yourself, replace source files
I changed after downloading the source tree made by Brad.(Pythoncore3.zip?, 37MB)
Replacement files are in a zip file.
http://pages.ccapcable.com/lac/src/
02/08/31 14:58
I made changes in build settings and that helped me to find out
the cause of some problems.
As a result, several other win32 modules were built, yesterday.
I decided to go around the ExitProcess related error in
win32process for the time being.
I still have problems with win32db and win32reg, but I'll work on them later.
Now, I want fix the problem of '_socket' module missing in action
and add zlib module Brad has mentioned.
After that, I don't know yet.
Probably I'll build for HPC2000 ARM as there seems to be more demand
than HPC2000 MIPS.
And maybe build for HPC/Pro, PsPC ( CE 2.11 ) if nobody does it.
2002-08-30
Well, finally, I've started to work on building again.
This time, I'm concentrating on HPC2000 MIPS Release build first.
It is already running on my machine, and it's a lot fater
compared to the debug build.
Right now, I have problem with compiling win32process and
_socket module is some how missing.
I hope to fix these issues, soon.
In the mean time, I brought all files to my own web site,
so that anyone can download them without having logged in to YahooML.
So, if you are using HPC2000 ARM, you have still the debug build I made
last year, but with socket and debug window always on.
If you have HPC2000 MIPS, you may enjoy faster release build, but without
_socket, win32process, win32sh, etc.
I would appreciate any help, especially to build CE2.11 HPC/Pro, PsPC version.
If some body can make up makefile that will work for all buids,
it would be great.
telion
PS. I did regrtest on my MIPS build, and mostly it went well.
2001-11-15
I added three modules.
win32sys, win32sh, win32ras.
If you want documentation about these modules,
I will upload source files. (That's only doc as far as I know.
And best documentation of all !)
Other source of information is MS eVT (EmbeddedVisualTools 3.0).
This free tool comes with nearly everything you need and more.
Surely there are some shortcomings and weakpoints, still it is one of
the best tool available for Windows CE.
2001-11-15
Well, win32process is done.
It ws even easier than I thought.
Try it with my version of os.py and osce.py inthis file area.
You can start any Windows CE application with it.
2001-11-15
I studied about win32process and most probably I can
build it for PythonCE22 very soon.
This module is useful for invoking other WinCE apps from
PythonCE. I use this for execv() and system() clone.
And this module would be compatible for both
PPC and HPC, as far as I could understand at this moment.
Farthermore, other than win32gui module, all other
binary maybe compatible for both HPC and PPC.
If it's true, porting and building will be much much easier
for any other modules.
And both PPC and HPC version of PythonCE22 distributions
can be unified for each CPU..
Aonther thing I have discovered is that in HPC from 211 version,
there is a CMD.EXE (console window, or same thing as DOS-Window)
And this can be built for PSPC and PPC if you have PlatformBuilder.
This (may) means, you can use > >> < | and batch file on your PSPC,PPC.
Also, console application like Python can run in this console
if we modify the code.
I was attracted by this idea for a while, but deccided not to do that
because after some trial, I found that CMD.EXE uses lots of memory,
and anything done by CMD.EXE can be reproduced by python.
Still, I will make a kind of wrapper interface so that someone
who wishes to use CMD.EXE console for the IO will be able to do so
just by writing some python code without ever touching eVC.
2001-11-14
Now I made MIPS version and I am sure that it starts.
Also someone is trying to run it on Jordana.720 (HPC2000,
CE3.0 ARM)
2001-11-11
PythonCE22prealpha for HPC2000 ARM (with debug info) and MIPS Release build
###### WARNING #######
This is a pre-pre-alpha build.
Try it at your own risk.
I have tested MIPS build myself but I can't test
ARM version simply because I don't have ARM machine.
Please read Background for details.
Now, we know that it will run, with some
changes to pcceshell.py.
I'll upload patched version of ceshel.py.(2001-11-14)
Known bugs:(2001-11-15)
This python still thinks that it's a "Pocket PC Python"
and report accordingly with sys.platform.
Also it loads and executes pcceshell.py (PPC version of
ceshell.py; a start up script for Python CE)
To go around this, use the pcceshell.py in this directory.
I'll fix this minor cosmetic problem later.
When you try to import a module that imports some
other modules and if one of these module is missing,
it may screw up namespace and/or refcount.
In some cases, Python Interpreter will hang, while
it is still possible to edit the text in Python console.
Go and check CMD.ExE window for any debug informaion.
Maybe this happens because it is a debug build.
(debug build seems to use different functions, especially
for refcount related one)
As a result, you may not reload that module unless
Python is shutdown and restarted.
This is annoying. So I'll do something about it.
Any thought about the cause?
*** Remark: These problems are already gone..
Background
I started to adapt PythonCE22 Brad has ported to iPaq (CE3.0 PPC)
for my own machine the day before yesterday, 2001-11-10.
As I was having trouble reproducing the same build for PPC,
I tried different project settings on different build configurations.
And somehow, this build went all the way through against my expectation,
while I could't even reproduce Brad's configuration.
Adaptation from PPC to HPC was done by removing PPC specific code
with a few preprocessor directives. That's all I did.
So, honestly, this trial build may not run at all.
If it works for you, it would be nice.
(Now I know it should work, but with some bugs)
I'll build for x86em and/or HPC MIPS so that I can test by myself.
But mean while, those who owns HPC2000-ARM (I don't even know if it exists!)
may have pleasure or pain of using world premier PythonCE22 for HPC.
I really wanted to taste that pleasure myself, believe me.
Unfortunately, I'm still trying to solve some linker errors.
As soon as that is fixed, I'll build for HPC2000 MIPS,
and then for HPCPRO and other CPUs.
Have fun.
Telion
- telionce@yahoo.com -
Go back to the Top (Python CE 2.2+ for HPC)
Telion CE pages
telionce@yahoo.com