Re: [PythonCE] How to determine special folder location

2010-03-28 Thread Alexandre Delattre
Hello,
I don't have a winmo device at hand to test
but maybe you can try finding the function in ctypes.windll.aygshell instead
of coredll.

2010/3/27 rodi 

> Hello PytonCE users,
>
> I need to determine the location of special folder like 'start menu'
> but ther's neither SHGetFolderPathA nor SHGetFolderPathW in
> ctypes.windll.coredll.
> Has someone a workaround to solve this problem?
>
> Cheers rodi.
> ___
> PythonCE mailing list
> PythonCE@python.org
> http://mail.python.org/mailman/listinfo/pythonce
>
>


-- 
Alexandre Delattre
Phone number : +33674116213
Mail : alexandre.delat...@telecom-bretagne.eu
Web log : http://alexdweb.alwaysdata.com/blog/
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Issuing WM_COMMAND

2009-05-27 Thread Alexandre Delattre
Hello Marc,

It is possible to send WM_COMMAND messages with pythonce, using ctypes to
interface native win32 

 Functions:

from ctypes import *

SendMessage = cdll.coredll.SendMessageW

 

WM_COMMAND = 0x111

SendMessage(hwnd, WM_COMMAND, wparam, lparam)

 

You can wrap other functions with ctypes to get the hwnd of the window you
want.

 

Hope it helps,

Alex

 

De : pythonce-bounces+alexandre.delattre=telecom-bretagne...@python.org
[mailto:pythonce-bounces+alexandre.delattre=telecom-bretagne...@python.org]
De la part de Marc Grondin
Envoyé : mercredi 27 mai 2009 18:56
À : pythonce@python.org
Objet : [PythonCE] Issuing WM_COMMAND

 

Hello everyone,
I'm fairly new to python and pythonce and i have a quaetion. Is it possibble
to issue WM_COMMANDS on a WM device using pythonCE?(i have ver 2.5 from
october)

-- 
C-ya Later Take Care
Marc Grondin

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


Re: [PythonCE] Porting Modules

2008-12-27 Thread Alexandre Delattre
Well it depends of what you have in mind. Do you mean porting pure python or C 
python modules ?
In the latter case, tell me what OS are you planning to use (windows or linux).

-Original Message-
From: NOC 
Sent: samedi 27 décembre 2008 09:09
To: pythonce@python.org
Subject: [PythonCE] Porting Modules

Where can I find information on how to Python port modules to PythonCE? 
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


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


Re: [PythonCE] Updating Python version?

2008-11-03 Thread Alexandre Delattre
Hi,
A few month ago, Joseph Armbruster merged the PythonCe's patch with python 2.6. 
You may be interested in looking at his notes 
:

Regarding, questions about ppygui I recommend you posting them in the 
sourceforge forum.

Regards,
Alexandre

-Original Message-
From: Lachezar Dobrev <[EMAIL PROTECTED]>
Sent: lundi 3 novembre 2008 09:59
To: pythonce@python.org
Subject: [PythonCE] Updating Python version?

  Hello colleagues,
  After some hassle I was able to install the available PythonCE
version on the XScale device.
  However it seems, that the current PythonCE version (December 19,
2006) is quite old.
  I am wondering whether PythonCE has some migration procedures, or
does it need a full rebuild?

  A bit off-topic, but is this the correct list to ask questions on
PocketPyGui, because I have a few issues there I would like to
elaborate on.
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


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


Re: [PythonCE] HTTPS support in httplib

2008-10-07 Thread Alexandre Delattre
Hi,

You may give a try to tlslite  which works fine with 
PythonCe.

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


Re: [PythonCE] Can I execute external programs from PythonCe?

2008-09-06 Thread 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
from ctypes import *
import os

CreateProcess = cdll.coredll.CreateProcessW
WaitForSingleObject = cdll.coredll.WaitForSingleObject
GetExitCodeProcess = cdll.coredll.GetExitCodeProcess
DWORD = HANDLE = c_ulong

class _PI(Structure):
_fields_ = [('hPro', HANDLE),
('hTh', HANDLE),
('idPro', DWORD),
('idTh', DWORD)]

def _create_process(cmd, args):
pi = _PI()
CreateProcess(unicode(cmd), 
  unicode(args),
  0,
  0,
  0,
  0,
  0,
  0,
  0,
  byref(pi))
  
return pi.hPro

def _wait_process(hPro):
WaitForSingleObject(hPro, c_ulong(0x))
return GetExitCodeProcess(hPro)

def _quote(s):
if " " in s:
return '"%s"' %s
return s

def execv(path, args):
if not type(args) in (tuple, list):

raise TypeError, "execv() arg 2 must be a tuple or list"

path = os.path.abspath(path)
args = " ".join(_quote(arg) for arg in args)
_create_process(path, args)

def execve(path, args, env):
execv(path, args)

def systema(path, args):
if not type(args) in (tuple, list):

raise TypeError, "systema() arg 2 must be a tuple or list"

path = os.path.abspath(path)
args = " ".join(_quote(arg) for arg in args)


hPro = _create_process(path, args)

return _wait_process(hPro)
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] pass Python string to C char *

2008-08-22 Thread Alexandre Delattre

> Well, it works! I realised I had not updated the DLL on my device (that's
> what comes of working late). Just for the record, I have tested two 
methods,

> and both work fine to pass a string to a C dll requiring a char * input:

1. use mystr1=c_char_p("mystring")
2. use mystr2=create_string_buffer("mystring")

> Both methods require the ctypes module and work equally well with the 
DLL,
> but there are some differences (all of which I am not aware at the 
moment).
> Method 1 creates a ctypes Array object, whereas method 2 appears to 
create

> something which behaves more like a standard Python string.

From my experience, it sounds to me that c_char_p creates a wrapper 
over an existing python string that is suitable for being passed as 
argument in a ctypes dll function.


create_string_buffer will duplicate the content of the string in an 
internal buffer and the resulting object will provide a fixed-length 
array interface to modify this buffer from python.


This one should be used when the c function will modify the char* 
argument in place (i.e. write directly in this buffer). Since python 
strings are supposed to be immutable (with the benefit of being hashable 
and so insertable as keys in a dict) first method should not be used here.


cheers,
Alexandre

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


Re: [PythonCE] pygame / distutils

2008-08-15 Thread Alexandre Delattre
Jared & Adam,
Glad to hear you were able to cross compile sdl with cegcc, this opens the 
possibility to compile pygame with cegcc, which may yield better results than 
Microsoft tools :)

Some times ago, I've sent Jared a PythonCE 2.5 import library and an scons 
script to easily compile Python modules with cegcc. I think they'll be useful 
for compiling pygame.

(Btw, I have a working PIL port built this way that I'll be happy to put online 
soon)

Jared, did you manage to compile SDL_Image on top of SDL ?
I think it's the only extra dll that is needed by pygame to work. 
I remember that when compiling with embedded vc++ this dll was compiled almost 
out of the box since the low level calls were handled by SDL so no porting was 
required.
Would be cool to have SDL_Mixer too.

Best regards,
Alexandre___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Programaticly moving cursor in multi-line edit control

2008-08-14 Thread Alexandre Delattre

Igor,

I've tested your app, and what happens really is that the cursor itself 
is moved at the beginning but the edit isn't scrolled to make it visible 
(if you press an hardware key or try to insert a few characters, you'll 
be then scrolled at the beginning). This seems to be the normal 
behaviour of windows ce.


There is at least 2 way to solve that:

1) Use the line proposed by Jared to make the conversion between unix 
and windows line endings, so the problem isn't even ask. I recommand you 
to use this in your case.


2) Make some "invisible" changes at the beginning of the Edit, so that 
the view is scrolled to show the change, you can use this snippet:


self.text_entry.selection = 0, 1
self.text_entry.selected_text = self.text_entry.selected_text
self.text_entry.selection = 0, 0

I think that, later, I'll surely implement scrolling methods so that 
kind of stuff could be done much more cleanly.


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


Re: [PythonCE] Programaticly moving cursor in multi-line edit control

2008-08-13 Thread Alexandre Delattre

Igor,

From what you say, I don't see what you could have done wrong.
can you send me the full source code  so I can give a try ?

Alexandre

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


Re: [PythonCE] Python CE on a Intel XScale industrial device.

2008-08-05 Thread Alexandre Delattre

> Success!
> After manually copying the ...\ppygui-0.7\ppygui\*.py to a newly
> created $PYTHONHOME\Lib\site-packages\ppygui the demo application
> started (pretty damn fast!) and displayed correctly (as far as I
> know).

Glad to here that works :)

> Now... Do I need the Tkinter pack to use ppygui? I did not find any
> reference to that, and I am eager to trim down the Python
> distribution.

No, ppygui has no external dependence besides PythonCE and the system 
dlls that comes out of the box on wince devices. A byte-code only 
distribution of ppygui is around 250 kB.


> I'll be having problems creating a distribution pack for
> installing on the devices we'll be using.

These days I've been working on a script that helps producing easily 
.cab for pythonce applications and libraries. Hopefully I'll polish and 
publish it in the week.


> Hmm... I wonder if I could be converted into a Python Head.

You mean a python egg ?

Also, I remember from the time I played with evc++ that PythonCE is 
targeted for armv4 processors. From what I read XScale is armv5 but is 
supposed to be backward compatible with armv4.
Maybe the .cab installer check the processor type id without taking into 
account backward-compatibility stuff ?


I think you don't have to hurry on recompilation yet if you're able to 
make work what you need for your project. Also I'm afraid only Visual 
Studio 2005 allow to compile for armv5, in case you really want to 
recompile something optimized for your architecture.



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


Re: [PythonCE] Python CE on a Intel XScale industrial device.

2008-08-04 Thread Alexandre Delattre

Hi,

What I meant is that if you can run python.exe without crashing, it 
seems obvious to me that this code is compatible with your processor 
(else the .exe would refuse to start, or you would have very strange 
results and won't be able to enter a single command).
To me, the processor seems not to be the real backend problem, but you 
may be right about the processor type specified in the cab preventing 
the installation.

Are you able to install other PocketPC applications from .cab ?

> Alexandre...
> Who is 'we' who should rebuild the CABs?

Good question ... I'd really like to do that but I don't have much time 
right now (plenty of other projects and stuff to do...) and need to have 
evc++4.0 working on my computer (f*ckin windows vista ...).

If someone is willing to take that up, I'll be glad to give directions.

> Any pointers on the ppygui installation issue?
The traceback points to the Html control module, which is not the most 
essential, however, as the installer relies on this control you'll have 
to proceed to manual installation, i.e. copy ppygui package from the 
archive to \Program Files\Python25\Lib


Then you have to edit ppygui/api.py and comment out the line:
from html import *

Then try to run the demo.py file which does not use the html control, 
and see if it works.


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


Re: [PythonCE] Python CE on a Intel XScale industrial device.

2008-07-31 Thread Alexandre Delattre
Hi,

In my opinion if you're able to run the python exe it means that is not 
processor related.

I think the problem comes from what you've pointed out, the OS versions 
constraints.

I think we should rebuild the .cab to allow os versions from 4.00 and 5.99 as 
you suggested. There's also a bug in the cab that would be worth fixing at the 
same time:

In one of the registry key that associates  .pyw to pythonce without shell we 
have to replace \nopcceshell by /nopcceshell.

Else this cause the error : to be raised when running .pyw.

For tKinter, the dll are not shipped with PythonCE and you have to copy them 
manually, more info on the wiki.

For ppygui I'll be very glad if you use my toolkit, and if you send me your 
traceback I'll make my possible to make it work for you.
I think the issue you described comes from that ppygui was designed for 
PocketPC 2003 and Windows Mobile, while it seems from screenshot your device 
has the 'classic' wince interface.

Regards,
Alexandre


- Message d'origine -
De: Lachezar Dobrev <[EMAIL PROTECTED]>
Env: jeudi 31 juillet 2008 17:05
À: Alexandre Delattre <[EMAIL PROTECTED]>
Objet: Re: [PythonCE] Python CE on a Intel XScale industrial device.

  Update follows...

  People on this list were quite helpful in referencing a couple of
tools for Pocket PC CAB file mangling.
  1. I was able to extract the Python CE CAB file an uploaded the
extracted files to my device. The python executable had an icon, and I
was able to run it. It seemed to work. I was able to execute a few
minor tests my way: a few dir()-s, a few imports, a few Base64
encoding and decoding operations, and it seemed to work fine. Until I
tried to import Tkinter:

> >>> import sys
> >>> import Tkinter
> Traceback (most recent call last):
>   File 
> "C:\devl\release\PythonCE-2.5-20061219\Python-2.5-wince\Lib\lib-tk\Tkinter.py",
>  line 38, in 
> RuntimeError: Could not find CeLib DLL
> >>>

  Which led me to believe something is not right.
  Has anyone seen that? Does anyone know how to fix that?

  A similar error occurs when I try to install the PocketPyGui
(ppygui-0.7) which I thought I would use for the GUI part. However the
exception then has a bit longer stack trace (about 10 frames).

  2. Reading the documentation on the pocketpc-cab and lcab utilities
I found something that rang a bell:

Appendix A: a list of processor architectures
...
1824 - ARM 720
2080 - ARM 820
2336 - ARM 920
2577 - StrongARM
...

My device says in the System Properties: 'Intel, ARM920T-PXA27x'
Could this be the culprit of my problems? Is ARM920 compatible
with Strong ARM? Should I give-up on trying to install the current
version and try to compile a version for my device personally?

  I also noted that the CAB files state, that the allowed OS version
is 4.00 up to 5.00, shouldn't it be up to 5.99 or something? Not that
my device has Windows 5.1 or anything, but I saw a the Smart Phone
version note a MAX OS Version of 5.99...

  I hope I get more feed-back on the subject.
  I feel I am getting closer, but I am neither a Mobile-Device expert,
nor a Python expert. I am fairly new to this stuff.


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


Re: [PythonCE] pygame / distutils

2008-07-28 Thread Alexandre Delattre

Hi,

I've been able to make pygame-ctypes works with SDL.dll and 
SDL_Image.dll built from "unofficial" wince project files of SDL, with 
very minimal changes.


I'm keen to package this and make it public, but you must note this is 
very experimental and  is a bit slow. The constraints explained by 
Christopher, especially regarding current directory support, applies 
here too.


I did not manage to compile the C version with evc++4 but I'd like to 
give a try later with cegcc, unfortunately I do not have the time for 
this yet.


Also, before rushing in compilation, it may be interesting to benchmark 
pygame and pygame-ctypes on desktop to evaluate if there would be a 
really speed gain in using a compiled version.


As pygame is mostly a wrapper around SDL, I found it hard to evaluate 
the overhead caused by using ctypes instead of c code. A benchmark would 
help us to see clearer.


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


Re: [PythonCE] Python CE on a Intel XScale industrial device.

2008-07-28 Thread Alexandre Delattre

Hello,

I'm doubting the problem comes from the processor type, as you were able to
run the Python 2.2 port which is also compiled for arm. Unfortunately 
CeGCC support only arm platform yet (the two cross-compilation targets 
available are arm-wince-cegcc and arm-wince-mingw32) so I'm afraid it 
wouldn't be of any help if arm code wasn't compatible with xscale 
processor (which I'm doubting).


I'm suspecting more there is another constraint specified in the .inf 
file used to create the PythonCE cab that prevent installing on your 
device, but I don't see now what it could be exactly.


I suggest you to try to make a "hand-made" install by copying the 
\Program Files\Python 25\ dir from another install to your device and 
see if you could run python.exe.


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


Re: [PythonCE] The State of Affairs

2008-07-20 Thread Alexandre Delattre
Please ignore my previous message, I hit the "Send" button accidentaly.

I was thinking that a first step to enhance distribution of PythonCE apps, 
would be to be able to create easily .cab for them.

.cab are installable over the air, as well by cross installing from desktop.

If I met enough positive feedback, I'll start trying to implement a distutils 
extension that will allow to create .cab the python way (i.e. Without using 
directly MS tools)

Looking forward your feedbacks,
Alexandre___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] The State of Affairs

2008-07-20 Thread Alexandre Delattre
Hi all,

After a bit of thinking, I wonder___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Comtypes installation problem...

2008-07-19 Thread Alexandre Delattre
Thomas,

In pypoom and when embedding activex controls in venster/ppygui I hadn't met 
the need to use the SAFEARRAY type.

Regards,
Alexandre___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] ~Name not defined" error

2008-07-11 Thread Alexandre Delattre

David Williams wrote:

I have replaced the lines as suggested and now get the error:
:[Error 2] The system cannot find the 
file specified


I would be grateful for any further help.
Thank you
David williams

2008/7/11 <[EMAIL PROTECTED]>:

ConnectRegistry seems not to be implemented in PythonCE

However you can still replace:


aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)

aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")

by:

aKey = OpenKey(HKEY_LOCAL_MACHINE,
r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")


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




Hmm, you must make sure the key is existing in your device registry.
Try to double check this and that the key isn't mispelled (btw, I use 
PHM Regeditor
on my pda for this kind of stuff 
)


The use of raw string r"..." notation prevents you from having to escape 
\ characters,

maybe give a try to:

aKey = OpenKey(HKEY_LOCAL_MACHINE, 
r"Software\Microsoft\Windows\CurrentVersion\Run")


Hope it helps,
Alexandre

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


Re: [PythonCE] ~Name not defined" error

2008-07-11 Thread alexandre . delattre

ConnectRegistry seems not to be implemented in PythonCE

However you can still replace:

aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)

aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")

by:

aKey = OpenKey(HKEY_LOCAL_MACHINE,  
r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")


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


Re: [PythonCE] The State of Affairs

2008-07-11 Thread alexandre . delattre

When I was working on PythonCE years ago I had the same concerns.


I am wondering if Python eggs, easyinstall and setuptools could be  
put to use for this. Rather than starting from scratch.


I think easyinstall at least gets you the dependency checking,  
downloading (non-graphical) and installation. removal is a pain.


Brad, this sound likes a good idea but using these tools would require  
to port distutils to PythonCE first. I gave it a try ~  a year ago and  
while it does not raise particular error it was not working. I  
strongly suspected it has to do with wince lack of current directory  
but was unable to spot the problem exactly. Does someone on this list  
have been able to make distutils works on ce ?


Another option would be to extract or reimplement code for  
installation/uninstall of eggs without distutils dependency. So we can  
still create eggs on desktop with traditional methods and install them  
with PythonCE.


While I won't be able to make a so flexible as  
distutils/setuptools/easy install, I found reimplementing something  
more specific to PythonCE could be really interesting for the purpose  
of learning.


I gonna brainstorm a bit more before making a decision that would be  
hard to revert back.


Anyway, I take this occasion to thank you and others for making pyhton  
possible on wince :)


Regards,
Alexandre

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


Re: [PythonCE] PPYGUI - parent window and closing it

2008-07-10 Thread Alexandre Delattre
Adam, there's one downside to not use tMan: even if the window disappear it is 
still running background and the only way to really close it is in the Memory 
app of the control panel.

But rejoice, following this discussion I've been able to modify ppygui so that 
windows are really closed even without tMan :)

Now, even a .py file will see it's terminal closed when the gui main frame is 
closed, without using tMan.

Expect to see the code in svn in a few hours.

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


Re: [PythonCE] PPYGUI - parent window and closing it

2008-07-10 Thread Alexandre Delattre

Hello, Alexandre.



I have begun testing some ideas using the PPYGUI and find it very easy to
work with. However, I would like to ask if there is a way to know when the
user has pressed the 'X' button in the top right of the window to close the
app? The reason I ask, is that when I run some ppygui code a blank Python
window opens, then the ppygui app window opens on top of it. When I close
the app using the top right 'X' I am returned to the blank Python window.
This is very similar to the situation on the desktop version of Python,
where a terminal window opens unless your Python file is run with the .pyw
extension.



I can implement a 'close' button that executes the sys.exit() command, and
this successfully closes the app and the blank Python terminal window
together. Nevertheless that top right 'X' is still there, and I would prefer
the users of my app to have something consistent and which behaves as
expected (i.e when you press 'X' the app exits or at least is hidden fully).



How do it detect this 'close' event for the main app?



Adam


Currently the best option is to install the tMan task manager 
 or others,
which allow to close program when clicking 'X' instead of the default minimize 
behaviour which is problematic
with PythonCE (other PythonCE gui toolkits have the same problem regarding 
this).

PPygui has already some inner logic, which makes the 'app.run()'
line returns when the main frame is closed (with tMan), so it'll work well with 
it.

Unfortunately the .pyw extension is buggy on PythonCE due to a mis-written 
registry key,
You can fix it with a registry editor of your choice, by setting the key:
HKEY_CLASSES_ROOT/Python.File.NoShell/Shell/Open/Command/Default = 
"\Program Files\Python25\python.exe" /nopcceshell "%1"



You can also intercept the 'close' event at application level (but still need 
tMan to work)

import ppygui as gui
class MainFrame(gui.CeFrame):
 def __init__(self):
   gui.CeFrame.__init__(self, title='Hello')
   self.bind(close=self.on_close)

 def on_close(self, ev):
   if gui.Message.yesno('Confirmation', 
'Do you want to quit', 
'question', self) == 'yes':

 ev.skip() # If user say yes, let the close event be further processed by 
the default implementation which will close the window for good


Hope this helps,
Alexandre

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


Re: [PythonCE] The State of Affairs

2008-07-10 Thread Alexandre Delattre

Chris,

Also, if we are to encourage developers to build solutions that will  
work on the PDA, I think distribution is a problem. The environment is  
workable as a hacker, but if we want to simply the deployment and  
actually ship applications, at this point it seems a bit complex. It  
would be nice if there was a Py2App, or even, something along the  
lines where the solution could be bundled into a directory (not as an  
EXE, just as Python and your application files) for easy distribution.



I do agree the distribution is problematic especially for end-users having no 
experience of python.
The problem I see with a py2exe-like solution, is that if each application should hold ~4Mb 
(which is approximatively the size of python.dll+python.exe+standard library) this limits the number of apps
you can install on a handheld device. In my opinion, the separation of interpreter and source files is a more 
viable option on PDA, even if flash memory is getting cheaper and cheaper.


What I really like to start implementing is a web-based approach of programs distribution, 
a bit like apt-get on debian linux (with a graphical frontend of course) or like the Installer.app on jailbreaked

iphones.

This way it would allow us to search/install/uninstall python programs and libs 
from a common online source, in a few clicks,
directly on pda/smartphone, or by transferring the package with traditional 
methods if the first option is not possible.
Uploading new applications should be made easy too.

To do that we need:

* Choose a package format for storage/description of application files.
 We could use .cab or design a format specific for PythonCE applications.
 Some times ago, we made some brainstorming with Jared Forsyth on a .ppyp 
format (Pocket Python Package),
 which is a distutils-like way of defining packages.
 
* Create the Installer application itself, with it's logic and gui, 
 and ship it by default in the PythonCE distribution.


* Make a desktop application for easy cross installation of packages, when 
there's no direct web access on the
 pda. I've seen there are already existing RAPI bindings, this may help a lot, 
and seems the most 'universal' way
 to transfer files (i.e. by usb)

* Set up a web service for uploading and hosting packages, managing versions, 
...
 I think Django web framework could really help here, but no problem if it's 
another framework or not even in python


While a such project won't be achieved in one day, I definitely think it is 
worth the effort and will make PythonCE
superior to .NET regarding distribution user experience.

Regards,
Alexandre

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


Re: [PythonCE] PPyGui SVN & PPyGui-win32

2008-07-09 Thread Alexandre Delattre
Is there any way to have two buttons on the bottom? As it is I can only 
use one button (on the left) and one menu (on the right). Or is there a 
way to change the text of the button after it has been displayed?


So far PPygui allow only this menu bar layout, 
but I'd like to make a more flexible api for this in one of the next releases.


When printing times, is there any way to print the milliseconds? They do 
not show up when printing datetime.now() or time.time(). Milliseconds 
are displayed in PPyGui, but not on the smartphone.


AFAIK it's a limitation of the PythonCE port, however time.clock() works fine.

Also, I don't believe focus() works on widgets. It works in PPyGui, but 
not on the phone.


Noted.

Regards,
Alexandre

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


Re: [PythonCE] PPyGui SVN & PPyGui-win32

2008-07-08 Thread Alexandre Delattre

> Very nice! Will this work with WM5/WM6 Smartphones? I see that the
> installer will not run, however I wonder if it can be installed manually.

> -Justin


Currently some widgets are not usable on non-touchscreen smartphones, 
which from what I heard will make impossible to go through the installer.
However, while waiting for a better solution, you can copy the ppygui/ 
dir from the archive or svn to your \Program Files\Python25\Lib\ dir, 
and you'll be able to write some little apps that use only simpelest 
widgets.


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


Re: [PythonCE] PPyGui SVN & PPyGui-win32

2008-07-08 Thread Alexandre Delattre

> But, is this a screen as in a window, frame or just text on a display?
> Even photographs of a working example would tickle the imagination and
> creativity of people wanting to extend their development on mobile
> devices.

Good point :)
Will fix that ASAP

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


[PythonCE] PPyGui SVN & PPyGui-win32

2008-06-30 Thread alexandre . delattre

Hi all,

I'm pleased to announce that PocketPyGui development is now kindly  
hosted by Mirko "[EMAIL PROTECTED]"; Vogt :)


The svn repository host the latest version of PPygui as well as 3rd  
party apps and tools not published yet.

You can check it out by typing:

svn co https://svn.nanl.de/svn/ppygui/

and use "anonymous"/"anonymous" as user/password.

Especially, the repository contain the first version of the native  
PPygui win32 implementation,
which allow you to test and debug your PPygui apps directly from  
desktop Windows or with Linux through Wine.


As PPygui for win32 reuse 90 % of the wince implementation, this gives  
a fairly coherent and compatible environment for mobile apps  
development.
It is likely your existing apps will work out of the box, as it did  
for almost all of mine.


The only thing really missing now is gui.Html control, but it should  
not be to much hassle to implement it with comtypes and hopefully we  
can see it ported in a couple of days.


With very little effort you'll be able to make regular desktop gui  
applications, and reuse your components between classic and mobile  
versions of your app.


While PocketPyGui will remain focused on mobile devices, it'll be soon  
an alternative to create lightweight win32 applications that are easy  
to write and distribute.


As always, any contributions and feedbacks are welcome. Also, if you  
want to gain developer access to svn, feel free to mail me.


Regards,
Alexandre

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


Re: [PythonCE] Comtypes installation problem...

2008-06-27 Thread Alexandre Delattre
Nice,

Maybe there some other part of comtypes that would require the missing 
SafeArrayGetIID function and would fail at runtime (I mean some functions or 
classes that use this internally).
I'll have a little search through the code and use a os.name switch if 
necessary.

Best regards,
Alexandre
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] Comtypes installation problem...

2008-06-27 Thread Alexandre Delattre
Hi,

By the time I wrote pypoom, comtypes (version 0.3 if I remember well) worked 
out of the box on WinCe.

Sergei, if you send me your tweaked version of comtypes, I think I'll be able 
to replace your "comments" with more portable statements like :
If os.name == 'ce': ...
, or so.
And then  submit a preliminary patch to Thomas

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


[PythonCE] PocketPyGui

2008-04-23 Thread alexandre . delattre

Hi all,

I've just release the first public beta of ppygui.
You can read more and browse the WIP docs at .

Direct download is available from sourceforge at
 .

The install process is graphically based to encourage trying and  
(re-)distribution.

Also, feel free to post your questions and feedback on sourceforge.

Later on, I'll publish some of my open source apps including a jabber  
client, for bigger applications using ppygui.


Regards,
Alexandre

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


Re: [PythonCE] 2.6 update

2008-03-22 Thread Alexandre Delattre
Congratulations !

I'll be glad to try the new features of Py 2.6 right on my pda :)

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.

Great work anyway,
Alex
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] General questions

2008-01-07 Thread Alexandre Delattre
> I guess this is true while the app is running, but as soon as I close it,
> I will get the dialog again next time I run it?

Nope, it's a system-wide setting, this may be problematic if different apps 
have to connect differents devices,
but in your case this will always connect to your panoramic head.

When needed, you can reset the setting at the same place you enable the 
bluetooth serial port.

Regards,
Alexandre

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


Re: [PythonCE] General questions

2008-01-07 Thread Alexandre Delattre
> Is it possible to use this syntax:
>
>s = Serial(5)
>
>(0 = COM1, so 5 = COM6) ?

I don't think you can with the current ceserial, but you can always do 
something like this:

if isinstance(port, int):
port = "COM%i:" %port
elif insinstance(port, str):
if not port.endswith(":"):
port = "%s:" %port

>>/s.open() # This will pop a dialog allowing to choose which bt device to 
>>connect
/>
>No way to automatically connect to a specific bt device?

Well, at least not the first time, but on the dialog you can check the option 
"Always use this device", 
so further call to open will not show the dialog and use the device selected 
first time.

Regards,
Alexandre

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


Re: [PythonCE] General questions

2008-01-03 Thread Alexandre Delattre
Hi Fredéric and happy new year to all :)

> I found a little bluetooth/serial module for my panoramic head project:

>http://www.adeunis-rf.com/list_produits.php?lng=FR&gid=6&pid=ARF32+Data 
> 

> Do you think the com will be totally transparent with this module? My goal 
> is to drive a serial device, and I would like to avoid bluetooth 
> programmin stuff...

I've used only ceserial with bluetooth in little projects like winamp/bmpx 
remote controller, and a sms sender via a bluetooth phone,
and so far it seems to work like a regular serial port.
However, there's some little tricks to make it work at first :

1) You must create an ongoing port in your bluetooth settings, by default the 
outgoing port is COM6
2) In your code:

from ceserial import Serial

s = Serial("COM6:") # "COM6" only will not work, since it is based on the 
CreateFileW WinCE API function 
s.open() # This will pop a dialog allowing to choose which bt device to connect

# Then regular serial code

Hope it helps,
Alexandre

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


Re: [PythonCE] lxml

2007-12-03 Thread Alexandre Delattre
Hi,

Afaik there's no port of lxml yet. A starting point would be a port of 
libxml2 itself.

Anyway have you tried ElementTree which is shipped with PythonCE 2.5 ?
Lxml based it's API on it, so basic XML infoset manipulation is exactly 
the same in etree, but works out of the box.

http://docs.python.org/lib/module-xml.etree.ElementTree.html

Maybe you're interested in the standards support of lxml ( XPath, XSLT, 
schemas validation ...), in which case I advise you a pure python 
solution (http://4suite.org/index.xhtml)

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


Re: [PythonCE] Tkinter gif problem on PythonCE

2007-12-03 Thread Alexandre Delattre
> Hi everybody,

> where can find downloads and instructions for installing pythonce?

For PythonCE instructions, the wiki is your friend : 
http://pythonce.sourceforge.net/Wikka/HomePage

> does it come with the thread module?

Yes. Limitations and differences of pythonce from regular Python are shown 
here: 
http://pythonce.sourceforge.net/Wikka/WindowsCEDifferences

> if so, do you think I may be able to run Gluon (http:// 
> mdp.cti.depaul.edu) or should I expect any major obstacle

The django framework works well on pythonce, so I think Gluon should work with 
no or little effort.

Regards,
Alexandre


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


[PythonCE] PythonCe suddlenly closes

2007-11-27 Thread Alexandre Delattre
Hi,

With the command line, you can specify the /nocpcceshell flag to prevent 
the console gui to appear:
 > python /nopcceshell \medir\script.py
The output is then directly written in the PocketCMD console.

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


[PythonCE] Wxython for PythonCE 2.5

2007-11-12 Thread Alexandre Delattre
Hi, 

> For what concerns me, I use Python because I have absolutely no
> knowledge of C programming in Windows, neither the applications needed
> to develop in C under Windows CE... neither the time to learn, sorry.
> I'll stick to Tkinter until I'll be able to install Linux on my
> smartphone...


If you want an alternative ot Tkinter, expecially if you're interested in 
native rendering,
you should look forward for ppygui ( http://sf.net/projects/ppygui ).
It is inspired by Venster, using ctypes to access system graphic dll (this 
helps a lot circumventing the virtual adress space limitation, beeing pure 
python and implementing no additional dll),
but this is a brand new api, designed for python developers, and requires 
absolutely no knowledge of the C win32 api (But you can extend ppygui quite 
easily if you know so). 

I'm still developing it actively but the current basis provides the following 
features explained in this mail: 

http://mail.python.org/pipermail/pythonce/2007-October/001874.html

The toolkit works well on PocketPc and Touch-screen based Smartphone, and 
Christopher Fairbairn will help me porting it to
other smartphone devices.

There's a CVS up on sourceforge, but no public release yet.
This is because I may still introduce little backward incompatible changes if 
for instance I find a better/more pythonic api for some controls,
but I'm inclined to send the work done so far to anyone asking for it.

Regards,
Alexandre


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


[PythonCE] win32gui missing

2007-10-25 Thread Alexandre Delattre
Hi,

win32gui is a C extension module that hasn't been ported yet to pyce 2.5.
If you are used to win32 ui programming, you may find VensterCE useful 
(http://sf.net/projects/vensterce/).

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


[PythonCE] Launching external programs

2007-10-25 Thread Alexandre Delattre
Hi,

The subprocess  and os.popen*() hasn't been ported yet, but a call to 
os.startfile("\\path\\to\\executable.exe") may help.
A drawback is that the function returns immediately

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


[PythonCE] Qt-wince

2007-10-22 Thread Alexandre Delattre
Hi,

A PyQt port should be feasible, but I'm afraid we'll end up with the 
same problems as wxpython port regarding high memory usage:
Wince kernel has a very tight virtual address space in which dll are 
adressed (about 32MB), this means passed a certain point, dll could not 
be loaded.
Also the address of the dll must be aligned on a 32k boundary (I'm 
unsure if it's the exact value), meaning it's better to have one big dll 
than many little for the same code size.

Basically, SIP and SWIG wrappers are a lot of dlls themselves.
I do not want to discourage anyone willing to port PyQt, but please 
consider these two points:

 - Wrap only the minimal gui classes to reduce code size
 - Produce only one dll for the wrappers, and better, link statically 
the wrappers with the Qt library

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


[PythonCE] Threads / network

2007-10-22 Thread Alexandre Delattre
Hi,

1) Yes, the thread and threading module are portable wrappers around the 
os threading facilities. This means they suffer from the same limitation 
of the os, I can remember there's about max 32 concurrent threads 
possible on wince (vs ~1000 on the desktop)

2) Yes, all you have to do is to bind your server, or connect your 
socket to the loopback interface via the ip 127.0.0.1

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


Re: [PythonCE] General questions

2007-10-21 Thread alexandre . delattre
Hi,

by USB Master, I guess you mean USB Host, some Acer models like my  
n321 have this feature so you can plug an usb stick or hard disk to  
access data.

As far as I know, communications with PythonCE can be made :

  - by network, using the standard socket module (useful for wifi)
  - by serial port, using the port of pyserial, ceserial  
(http://www.problemboard.com/dl/ceserial.zip), this works for real  
serial port and bluetooth serial port profile.

If you want to stick with USB, I think you should try to create a  
virtual serial port for usb with the driver given at  
http://www.ftdichip.com/Drivers/VCP.htm (don't know if it works for  
all devices) and use ceserial. Or maybe there's some drivers to setup  
ip over usb, then you can use the regular socket module.

Regards,
Alexandre

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


[PythonCE] PythonCE on Smartphone (WM6)

2007-10-18 Thread Alexandre Delattre
Hi,

I' am about to make a public release of PocketPyGui, an open source 
toolkit that provides an abstraction level over the raw Win32 GUI api.
I tried to design its API for python developers with no prior knowledge 
of win32 programming.

For instance, one of its main benefit over its ancestor, vensterce, is 
the transparent event handling that allow direct binding from signals 
(button pressed, list selection changed, ...) to callbacks (any python 
function that takes a single argument). Doing the same with VensterCE, 
would need to understand well about the C way to do message dispatching, 
handling, and would in some cases need to manually maintain a list of ID 
for each controls which is quite static and unpythonic.

The API also covers many controls : Button, Edit, Label, List (ListBox), 
Combo, Table (ListCtrl in report mode), Tree (TreeView), NoteBook, 
Progress (TrackBar), HTML, Date & Time control, Dialog, Font, ... I 
tried to give each control a complete and intuitive interface, making 
use of property and special methods where appropriate. Some controls 
(Canvas & ScrolledFrame) are still in WIP but will be included as a 
demo/tutorial.

As a bonus, ppygui implements dynamic resolution detection and scaling 
(meaning your app will appear the same on a hires or classic resolution 
device without thinking about it), and automatic tab/jog-dial traversal 
(but it can be explicitely deactivated for a Window).

All that to say that, even if I don't own a Smartphone, I'm definitely 
willing to make this kind of GUI abstraction for the next releases. Will 
setup the smartphone emulator provided by MS for my tests ...

Best regards,
Alexandre



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


[PythonCE] Wiki and spam comments

2007-10-09 Thread Alexandre Delattre
Hi,

I have tweaked the Wiki to input a captcha when registering new user a 
month ago and haven't seen spam attacks since. When I'll have some time, 
I will clean the spam comments directly with mysql and try disabling 
comment for unregistered users as you suggest.

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


[PythonCE] Smartphone support (Blackjack WM5)

2007-09-06 Thread Alexandre Delattre
Hi Stefen,

Even if I don't own a smartphone device, it's a very good initiative to 
provide binaries for smartphones :)
However, being curious, I looked at the patch page and was unable to see 
attachments with it. I may have looked at the wrong place, but I've 
double checked it and found nothing.

I think you should ask one of the project admin to make your cab appear 
in the main download page, since many smartphone users won't necessary 
have the patience to look in the patch section for working binaries ;)

With regards,

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


Re: [PythonCE] Spam on the wiki, it happened again :(

2007-08-19 Thread alexandre . delattre
Luke Dunstan <[EMAIL PROTECTED]> a écrit :

>
>> Date: Sun, 19 Aug 2007 12:21:20 +0200> From:   
>> [EMAIL PROTECTED]> To: [EMAIL PROTECTED]>  
>>  CC: pythonce@python.org> Subject: RE: [PythonCE] Spam on the wiki,  
>>  it happened again :(> > Luke Dunstan <[EMAIL PROTECTED]> a  
>>  écrit :> > >> >> Date: Sat, 18 Aug 2007 17:11:51 +0200> From: > >>  
>>  [EMAIL PROTECTED]> To: pythonce@python.org> > >>  
>>  Subject: [PythonCE] Spam on the wiki, it happened again :(> > Hi,>  
>>  > >> > Once again the wiki was spammed and it's the 3rd time in   
>> less > >> than a week :(> I'll clean the mess for now, but I'm   
>> beginning to > >> feel it's useless > until there is a stronger   
>> anti-spam system > >> somehow.> > Luke, what is your opinion ?> >   
>> I'd like to help but my > >> knowledge of php is really basic and   
>> you must > first authorize me > >> to do server side modifications.
>
> Are my messages appearing as a single line? I thought that had been   
> fixed, sorry. I don't know what to try next...
>> >> > I think the "captcha" plug-in would be the best option, but I   
>> don't > > know any PHP either. What is your SourceForge user name,   
>> so I can > > add you as a developer?> >> > My SourceForge user name  
>>  is alexd31.> I'll try to follow the instructions at   
>> http://wikkawiki.org/FreeCap > since it seems the easiest to   
>> integrate with wikka.
>
> You should now have access to the project web space.
>
> Luke

Thanks.

Alexandre



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


Re: [PythonCE] Spam on the wiki, it happened again :(

2007-08-19 Thread alexandre . delattre
Luke Dunstan <[EMAIL PROTECTED]> a écrit :

>
>> Date: Sat, 18 Aug 2007 17:11:51 +0200> From:   
>> [EMAIL PROTECTED]> To: pythonce@python.org>   
>> Subject: [PythonCE] Spam on the wiki, it happened again :(> > Hi,>   
>> > Once again the wiki was spammed and it's the 3rd time in less   
>> than a week :(> I'll clean the mess for now, but I'm beginning to   
>> feel it's useless > until there is a stronger anti-spam system   
>> somehow.> > Luke, what is your opinion ?> > I'd like to help but my  
>>  knowledge of php is really basic and you must > first authorize me  
>>  to do server side modifications.
>
> I think the "captcha" plug-in would be the best option, but I don't   
> know any PHP either. What is your SourceForge user name, so I can   
> add you as a developer?
>

My SourceForge user name is alexd31.
I'll try to follow the instructions at http://wikkawiki.org/FreeCap  
since it seems the easiest to integrate with wikka.

>> Another possibility would be to move the wiki to the MoinMoin   
>> engine, > I've read there's an anti-spam plug-in called HoneyPot   
>> that don't use > captchas (useful for blind people). Don't know if   
>> it's efficient, but > I've already played with MoinMoin and found   
>> it really great.
> I vaguely remember that I looked at that wiki software when I   
> created the wiki, but the main problem was that it uses files to   
> store data, which is not feasible on SourceForge. Any wiki that we   
> use needs to store data in a MySQL database.

>> Please, I'd like to hear what you think the best to do.> > With   
>> regards,> Alexandre.> > PS> > I've came with an (unrelated) idea   
>> that would benefit the PythonCE > community: it is to have a common  
>>  repository for PythonCE related > stuff (scripts, tools, ports,   
>> extension binaries, ...), it could be a > simple ftp at first or a   
>> website like the official Python CheeseShop. > If someone has a bit  
>>  of bandwidth to share or suggestions, they are > all welcome ;)

> Is it something we could put on pythonce.sourceforge.net ?
>
> Luke
>

It would be the most logical place for it, but I'm afraid we would  
come with the file limitation very quickly. I think it is more  
feasible to host it somewhere else and make a link from  
pythonce.sourceforge.net. I'd love to code the web app in django, but  
a ftp should suffice.

Alexandre.



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


[PythonCE] Spam on the wiki, it happened again :(

2007-08-18 Thread alexandre . delattre
Hi,

Once again the wiki was spammed and it's the 3rd time in less than a week :(
I'll clean the mess for now, but I'm beginning to feel it's useless  
until there is a stronger anti-spam system somehow.

Luke, what is your opinion ?

I'd like to help but my knowledge of php is really basic and you must  
first authorize me to do server side modifications.
Another possibility would be to move the wiki to the MoinMoin engine,  
I've read there's an anti-spam plug-in called HoneyPot that don't use  
captchas (useful for blind people). Don't know if it's efficient, but  
I've already played with MoinMoin and found it really great.

Please, I'd like to hear what you think the best to do.

With regards,
Alexandre.

PS

I've came with an (unrelated) idea that would benefit the PythonCE  
community: it is to have a common repository for PythonCE related  
stuff (scripts, tools, ports, extension binaries, ...), it could be a  
simple ftp at first or a website like the official Python CheeseShop.  
If someone has a bit of bandwidth to share or suggestions, they are  
all welcome ;)

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


[PythonCE] Spam on the wiki

2007-08-13 Thread alexandre . delattre
@Luke Dunstan:
I've seen you have cleaned the wiki, if you have time you can get a  
look on this page : http://wikkawiki.org/FreeCap, it's about  
integrating a captcha system with Wikka. Thanks,

Alexandre.

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


[PythonCE] Spam on the wiki

2007-08-12 Thread alexandre . delattre
Once again the PythonCE Wiki was spammed, fortunately no data seems to  
be lost, and with the history feature it should be easy to revert  
back. I'am almost sure the modifications are done by a web bot not a  
human person. Luke, would it be easy to use a captcha system in the  
Wiki (when creating an account, or editing a page) ?
Could you also close the accounts of the users who posted the spam ?

Any ideas suggestions to prevent spamming is welcome.

Alexandre.

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


Re: [PythonCE] Remotely uninstalling application

2007-08-07 Thread alexandre . delattre
Hello Petri,

This module should do the trick (assume you have ctypes):

uninstall.py :

from ctypes import *

DMProcessConfigXML = cdll.aygshell.DMProcessConfigXML
XML = u'''\

 
 
 
 
 
'''

def uninstall(app_name):
 '''
 Removes the program designated by app_name
 (as appearing in Program->Settings->Remove)
 '''
 xml_out = c_wchar_p()
 return DMProcessConfigXML(XML %app_name, 1, byref(xml_out))

Just call the uninstall function in any of you script and the job is done.
Worked on my Acer n311.

Regards,
Alexandre

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


Re: [PythonCE] PyCrypto binaries -- nearly there..

2007-08-04 Thread alexandre . delattre
Marc Horst <[EMAIL PROTECTED]> a écrit :

> Hi Alexandre,
>
> That is a good hint! I tried it and here is the result:
>
> Python 2.5 (release25-maint, Dec 19 2006, 23:22:00) [MSC v.1201 32 bit
> (ARM)] on win32
 execfile('\\Flash Disk\\Programmabestanden\\Python25\\Lib\\demo_pda.py')
> *** Unable to open host keys file
> *** WARNING: Unknown host key!
> *** Caught exception: : No module named mmap
> Traceback (most recent call last):
>  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line
> 166, in 
>agent_auth(t, username)
>  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line
> 53, in agent_auth
>agent = paramiko.Agent()
>  File "\Flash Disk\Programmabestanden\Python25\lib\paramiko\agent.py",
> line 68, in __init__
>import win_pageant
>  File "\Flash
> Disk\Programmabestanden\Python25\lib\paramiko\win_pageant.py", line 27,
> in 
>import mmap
> ImportError: No module named mmap
> Traceback (most recent call last):
>  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line
> 190, in 
>sys.exit(1)
>  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line
> 41, in dummy_exit
>raise ExitError()
> ExitError

>
>
> I looked on my __PC__ (as I guessed that if it worked on my PC, mmap
> should be called here too) for a file named mmap and for files with as
> content mmap, but found only test_mmap.py. So I'm not sure what should
> be concluded from this. Maybe that on my __PDA__ a different execution
> path is used, in which mmap is/should be imported, which results in the
> error message above.
>
> Maybe you can conclude more from this error message.
>
>
> Regards,
>
> Marc
>
>
> [EMAIL PROTECTED] wrote:
>> I will try to run paramiko+pycrypto myself, i strongly suspect   
>> paramiko to call sys.exit on some condition, so in the meantime you  
>>  can try to insert this in the beginning of your code (before any   
>> other import):
>>
>> import sys
>>
>> class ExitError(Exception):
>>pass
>>
>> def dummy_exit(code=0):
>>raise ExitError()
>>
>> sys.exit = dummy_exit
>>
>> and see if it raises an exception instead of quitting, then you can  
>>  track-down the source to locate the condition ...
>>
>> I'm not sure if it will help, but it may be worth trying.
>>
>> Alexandre.
>>

The mmap module hasn't been ported yet to PythonCE, this afternoon I  
have tried to use paramiko on my pda and found the same error. I have  
managed to bypass it by modifying agent.py, around line 67 make the  
following modifications :

Replace :
...
elif sys.platform == 'win32':
  import win_pageant
...
by
...
elif sys.platform == 'win32':
  if os.name == 'ce':
   return
  import win_pageant
...

this deactivates the Agent features of paramiko but it makes ssh  
connection possible !

Besides, I suggest you to use the new SSHClient class that basically  
wraps the whole demo script, I had success with the following script :

from paramiko import SSHClient, AutoAddPolicy

def main():
 client = SSHClient()
 client.set_missing_host_key_policy(AutoAddPolicy())
 client.connect('the server', username='', password='')
 stdin, stdout, stderr = client.exec_command('ls -l')
 print stdout.read()
 client.close()

if __name__ == '__main__' : main()

Good continuation on your project ;)
Alexandre.

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


[PythonCE] PyCrypto binaries -- nearly there..

2007-08-04 Thread alexandre . delattre
I will try to run paramiko+pycrypto myself, i strongly suspect  
paramiko to call sys.exit on some condition, so in the meantime you  
can try to insert this in the beginning of your code (before any other  
import):

import sys

class ExitError(Exception):
 pass

def dummy_exit(code=0):
 raise ExitError()

sys.exit = dummy_exit

and see if it raises an exception instead of quitting, then you can  
track-down the source to locate the condition ...

I'm not sure if it will help, but it may be worth trying.

Alexandre.

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


Re: [PythonCE] PyCrypto binaries

2007-07-27 Thread alexandre . delattre
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> a écrit :

> [EMAIL PROTECTED] wrote:
>> Johnny deBris <[EMAIL PROTECTED]> a écrit :
>>
>>
>>> Matt S. wrote:
>>>
 since I've not yet noticed the wxPython and ctypes binaries available
 for 2.5).


>>> ctypes seems to be part of the build... Works for me on 2.5 at least. ;)
>>>
>>> Cheers,
>>>
>>> Guido
>>>
>>>
>>>
>>
>> Yes, ctypes is now a part of Python standard library thanks to   
>> Thomas Heller.
>> As for wxPython, I maybe gonna look in compiling it for 2.5.
> It would be _REALLY_ cool. http://wxpyce.wikispaces.com/ is a try, but
> the binaries do not work for PythonCE 2.5 / wm5/6.
> I ever wanted to try following the Build-process-instructions with the
> latest sdk's (out of the hope, it will then run under 2.5 / wm5/6) but
> I have no x86-machine and no windows.
> Using wxwidgets with latest versions of python / wm would be very, very cool!
>>
>> Regards,
>>
>> Alexandre
>>
> Thanks,
>
> Mirko
>>
>> ___
>> PythonCE mailing list
>> PythonCE@python.org
>> http://mail.python.org/mailman/listinfo/pythonce
>>

Hello Mirko,

I will surely compile wxPyCe for 2.5 these days, as many people should  
be interested in. 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).
That's the reason why I have ported Venster (and now secretly working  
on something FAR more pythonic & high level for embedded gui  
development), and not because I dislike wx or I wanted to reivent the  
wheel.

It'll be cool if PythonCE people could have the choice between  
portability (TKinter/wx) at the cost of non-native rendering or high  
memory consumption or something more specific but that delivers native  
rendering with a small footprint at the cost of learning something new  
(VensterCE that may be phased out by my new toolkit).

My opinion is that splitting backend & frontend of an application  
helps portability, and rewriting the frontend for an handeld with its  
small screen size and its own design guidelines should not be a big  
deal if the toolkit is easy to learn (and better, pythonic), the  
biggest advantage of the new toolkit over venster.

This is only my opinion, and people are, of course, free to see  
otherwise and choose what they think best for their own development.

That's why I will compile wxPyCe for 2.5 and still support ctypes gui  
toolkit at the same time.

Regards,

Alexandre.

PS :
If someone want to give a try, help, give suggestions, or learn more  
about the new toolkit, I'll be glad to send you my current work with  
an example application. The reason why I call the new toolkit "new  
toolkit" is because I've wanted to call it first pycegui, but realized  
that it was the bindings of CEGUI for pygame ! Reminds me something  
about Pyro ;)




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


Re: [PythonCE] PyCrypto binaries

2007-07-27 Thread alexandre . delattre
Johnny deBris <[EMAIL PROTECTED]> a écrit :

> Matt S. wrote:
>>
>> since I've not yet noticed the wxPython and ctypes binaries available
>> for 2.5).
>>
>
> ctypes seems to be part of the build... Works for me on 2.5 at least. ;)
>
> Cheers,
>
> Guido
>
>

Yes, ctypes is now a part of Python standard library thanks to Thomas Heller.
As for wxPython, I maybe gonna look in compiling it for 2.5.
Although I was disappointed by the difficulty to run it due to the  
large memory footprint (which is perfectly understandable if you think  
that the swig bindings are a python layer over a c++ layer which is in  
turn a layer over a c++ library that wraps GUI native calls) a lot of  
people seems to use it on the list and I do love the wxPython desktop  
version, so i'll see if the compilation goes easy ...
Besides, any tricks on reducing the memory usage is welcome ;)

Regards,

Alexandre


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


[PythonCE] PyCrypto binaries

2007-07-26 Thread alexandre . delattre
Hi Marc,
You're a lucky one, I have built binaries of PyCrypto for PythonCE 2.4  
and 2.5 just a week ago ! A public download will be soon up on  
http://www.voidspace.org.uk/ thanks to Fuzzyman that already host  
binaries for desktop windows. Since I'm on vacation, I only have my  
local release for 2.5 at hand. So wait for the public link or mail me  
if you're interested in the 2.5 version.

@Luke Dunstan
Thank you for adapting the scons build environment to the wince  
platform, it makes compiling python extension much easier and more  
maintanable than the project oriented view of the embedded tools  
(especially for packages that contains many C extensions and would  
need as many projects as extensions).
It is also easier to switch python 2.4/2.5 includes and libs for the  
whole script. If you don't mind I will write an article on the wiki on  
how I build extensions with scons.

@Everyone
I have also built binaries for numpy 1.0, unfortunately I havn't been  
able to compile the random facilities but everything else seems to  
work fine (core, fft and linalg), for now no public release but you  
can mail me and i'll send you the files.

Have a nice summer,
Alexandre.


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


Re: [PythonCE] Build environment for PythonCE

2007-06-16 Thread alexandre . delattre
Hi Stewart,

Maybe you should include python headers before the regular ones.
To do so with evc4 : go to the menu Tools->Options, go to the tab  
Directories and choose include, then add an entry to the directory  
that contain python.h just before the regular includes.

i've been able to compile a few extensions with a such config, for  
instance numarray, so I'm pretty sure this config is correct.

Furthermore if you want to interface the SH* functions, you can also  
do so directly in python with ctypes, for instance  : from ctypes  
import cdll; cdll.aygshell.SHFullScreen(...).

For other example of such intefacing you can get a look at vensterce  
that uses the most common windows procedures.

Alex.

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


[PythonCE] GSM info

2007-04-27 Thread Alexandre Delattre
Hello,

I've never heard of an existing GPS module for PythonCE, however it 
should be possible to access the GPS API via ctypes, or communicate 
directly to the device via the COM port with pyceserial.

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


[PythonCE] Pypoom initial release

2007-04-25 Thread Alexandre Delattre
The first release of pypoom is online. Pypoom is a module that gives you 
access to Pocket Outlook PIMs.
For details, see the article i've published on the wiki 
(http://pythonce.sf.net/Wikka/PIMs).
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] VensterCE beta

2007-04-06 Thread alexandre . delattre
Hello everyone,
You can check the new release on sourceforge :  
http://sourceforge.net/projects/vensterce

Here is the change log :
- Added venster.layout : a BoxSizer class to manage the layout of  
controls, see the tutorial to learn how use it.
- Added venster.newdialog : a ModalDialog that closely emulates the  
behaviour of modal dialogs but that can be build like any other  
vensterce window.
- Various bugfixes and additions (constants and function that were missing).
- Improved WinCE 4.20 compatibility thanks to Jan Ischebeck.

Bonus : PyCEIde is now built upon scintilla -> syntax coloration, code  
folding and other goodies ...

As usual feedback is always welcome.

Alex.

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


Re: [PythonCE] VensterCE release

2007-02-01 Thread alexandre . delattre
A fresher version of vensterce is up on sourceforge  
(http://sourceforge.net/projects/vensterce/).
Various glitches have been fixed and sip handling is enhanced.
A control EditBox is implemented in venster.lib.edit and gives a text  
control with classic undo/copy/paste context menu.
The IDE is updated (and "englishised") and shows an example of integrating
HTML control in your apps.

Enjoy ;-)

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


[PythonCE] Re : numarray or numpy for WinCE

2007-01-30 Thread alexandre . delattre
Hello,

You can download a pre-compiled release of numarray 1.5.2
for python ce 2.4 at  
http://sourceforge.net/project/showfiles.php?group_id=104228

Alex.

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


Re: [PythonCE] VensterCE release

2007-01-30 Thread alexandre . delattre
Brian Brown <[EMAIL PROTECTED]> a écrit :

>
> On Jan 30, 2007, at 8:55 AM, [EMAIL PROTECTED] wrote:
>
>>> I'm curious.
>>>
>>> The original Venster was published under the MIT license.
>>>
>>> Why have you published Venster-CE under the GPL license?
>>>
>>> Alan.
>>
>> Well, I thought that the most important was to use an OSI compliant
>> license and I personnaly prefer GNU/GPL. I'am no license-expert, so if
>> you see any problem with this, tell me, and I could change the
>> licensing.
>>
>> Alex.
>>
>
> Hello Alex,
>
>
> I was under the impression that MIT is quite OSI compliant. I prefer
> MIT/BSD licensing and have published a great deal of code under that
> license (http://techgame.net/projects/Framework).
>
> I personally believe there is a great synergy between commercial and
> open source entities; for example, all the code we have created as
> expressly open source were completely funded by commercial entities. We
> make it as free as we can (MIT/BSD) for commercial or non-commercial
> use. The GPL typically bars commercial use because you can't keep any
> part of your system proprietary.
>
> Basically, If a toolkit is GPL, I typically won't use it when doing
> development of my own stuff, although there are lots of other licenses,
> such as MPL, APL and others that are less restrictive that the GPL.
>
> That's my 2 cents :)
>
> - Brian
>
>
>
>> ___
>> PythonCE mailing list
>> PythonCE@python.org
>> http://mail.python.org/mailman/listinfo/pythonce

Hello Brian,

Well, since I'm a student, I didn't really take into account  
commercial use. I ideally thought that GPL gives a lot of freedom for  
free or commercial development.
If it encouranges python ce users to choose venster as their gui  
toolkit, in free or commercial products, I will release the upcoming  
version under a MIT license.

Anyway, have you tried venster-ce ?
I'll be glad to have comments or (constructive :-) criticism !

Alex.

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


[PythonCE] VensterCE release

2007-01-30 Thread alexandre . delattre
> I'm curious.
>
> The original Venster was published under the MIT license.
>
> Why have you published Venster-CE under the GPL license?
>
> Alan.

Well, I thought that the most important was to use an OSI compliant  
license and I personnaly prefer GNU/GPL. I'am no license-expert, so if  
you see any problem with this, tell me, and I could change the  
licensing.

Alex.

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


[PythonCE] VensterCE release

2007-01-29 Thread alexandre . delattre
An experimental alpha version of vensterce is indeed up on sourceforge.
I hadn't many time for this project last months but tonight or tomorrow
i will post an updated version with HTML control support + few
corrections.  I will also update my IDE.

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


[PythonCE] VensterCE

2006-11-06 Thread Alexandre Delattre




I have started a port of Venster for
PythonCE, 
This port lacks maturity by now, but i have managed to run some test
applications using common controls, custom dialogs and gdi graphics on
my win mobile 5 device (Acer n311).

What is done :

  Working versions of windows.py, wtl.py, wtl_core.py, comctl.py,
dialog.py and gdi.py
  
  I have written convenience functions for handling Software Input
Panel, Fullscreen Dialogs and Context Menus

What does not work :

  All modules using ctypes.comtypes (atl and html modules) . 
  
  Original venster test apps need to be tweaked to run correctly.
  Common dialogs (Open, Save, Choose Font, ...).
  
  I have managed to make native menus on win mobile 5, but it did
not work on pocket pc 2003  (Dell Axim), however an empty menubar works
on both. 
  


I use PythonCE 2.4.3, ctypes-0.9.9.6 and the "Force Hi-Res" utility.
I have launched a project at sourceforge (vensterce) and i will upload
my alpha version as soon as the project is accepted.
PythonCE users will be welcomed to test it, use it, modify it and make
suggestions.

When the port will be more mature, it would be interesting to write a
more "pythonic" wrapper on it, or something compatible with wxWidgets
for portability.

Alexandre Delattre



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