[PythonCE] Open File dialog example

Telion telionce@yahoo.com
Tue, 8 Oct 2002 05:54:51 -0700 (PDT)

--- Aaron J Reichow <reic0024@d.umn.edu> wrote:
> On Mon, 7 Oct 2002, Telion wrote:
> Seeing the GUI stuff talked about on here, it makes me wonder- isn't there
> an easier way to do this?  That is, Win32/CE GUIs?  Are there not already
> libraries that sit ontop of the win32gui/win32api that provide something
> more usable that writing Win32 API directly?  I've no experience with
> Python on Windows (my J720 is my only Win-runnin machine), but surely,
> there must be something?  does anygui wrap win32gui/api?  I realize we may
> have to do some editing (how different is the WinCE subset from the
> original Win32 API?), but there's got to be a better way.
> Luckily, in the meantime, I have Dynapad (http://dynapad.swiki.net/1) for
> more managable rapid app dev and scripting for when I'm on the road and in
> the wilderness. :)
> Regards,
> Aaron
>   Aaron Reichow  ::  UMD ACM Pres  ::  http://www.d.umn.edu/~reic0024/
>   "the question is no longer between violence and non-violence; It is
> between non-violence and non-existence."  :: martin luther king junior

Hi Aaron,

I am a lazy person.
And IF I knew easier way, I didn't bother win32 API.

Win9x/NT/2K/XP/XXX has nice and easy GUI stuff, except CE.
Precisely that is why everyone is talking about that.

PythonCE does not have very easy GUI. But Why?
It's simply because NOBODY ported them to CE, yet.

And to port them, you have to know about Win32 API,
the difference between other win32 and winCE,
and maybe python internal.

Nice GUI on CE will not come unless someone invests
his/her time and/or money.

So if you really want to use nice and easy GUI, 
please contribute something toward it.

Trying systematically GUI elements written for win32 could be a
good starting point.
We will know what is already usable and what we need to work on.

Also, there are numbers of other GUI alternatives I can think of.
1. You can run Python as a http server (easy things to do),
and use PIE or other Browser or UserInterface.
(Similar to Jeff has demonstrated in IPC)

Advantage of this approach is evident.
You can use this for local, as well as remote solution.
Designing UI is as easy as making a web page.

You should think about security stuff, though.
(eg. Don't allow connection from other than, etc...)

2. Similar to Number One, but use Telenet Interface.
In DEMO section of Pyrhon distribution for BIG computers,
there is a script called PySvr.
Compared to Number one, it's not really GUI, 
(other than VTxxx compatible escape sequences..)
but this script may run right now, without any effort.
(I didn't have time to test it, yet)

3. Using GUI components that is already ported to CE.
Calling MFC functions or other external DLL functions
from Python is relatively easy.

You can use many common dialogs or IE components, too
If you use IE components, writing GUI is pretty much
similar to making a web page with forms.
(XML, javascript can be used, if you like)

If there is a GUI stuff made for PocketScheme or other software, 
maybe Python can just make a call to the DLL.

THere are a few Game Libraries out there, too.
Most probably, Python can call their functions.
Searching Google with "Game library WindowsCE"
shows lots of things.

(STHtmlDialog looks interesting)

4. Someone may start porting tkinter, soon. 
I don't know his time table, though...


Anyway, if you want easy GUI, please make a effort and share it with us.
Or use Perl/tk, SmallSqeuak, Dialect, etc...as you do.

By the way, at least OpenFile Dialog is now usable, and easy.
(SaveSa Dialog can be realized in similar manner, too.)
>>> import cs
>>> yourfilename = cs._test(r"Dialog Title",r"\InitialDir")
(For PPC, using tGetFile.dll maybe better)

- telionce@yahoo.com -

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More