Re: Pure Python GUI lib?

2007-12-22 Thread Andrew MacIntyre
oyster wrote:
> For the word "Pure", I mean it is not a C/C++/Z++.. extension, so that
> we can use it under  pythons of different version. Is it possible?
> I don't like to update the module for different python and the module
> 
> Currently, I am writing the interface to
> iup(http://www.tecgraf.puc-rio.br/iup) via ctypes, but find 2 too
> strange things which have let me feel blue for some days, and I don't
> know whether it can be successful or not. Can anyone give me some
> lights? Thank you. :)

Venster is a Windows API GUI wrapper on top of ctypes.  Fairly low level,
but quite viable.  I have an application at work using an old version 
(0.21) on an old version of ctypes (0.6.3) that works fine, though it
doesn't do MDI.

Sadly Venster appears not to have recently been maintained in line with
changes in ctypes, but the code (available from SourceForge) could still 
prove a useful reference.

Cheers,
Andrew.

-- 
-
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED]  (pref) | Snail: PO Box 370
[EMAIL PROTECTED] (alt) |Belconnen ACT 2616
Web:http://www.andymac.org/   |Australia
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pure Python GUI lib?

2007-12-22 Thread kyosohma
On Dec 22, 7:31 am, oyster <[EMAIL PROTECTED]> wrote:
> For the word "Pure", I mean it is not a C/C++/Z++.. extension, so that
> we can use it under  pythons of different version. Is it possible?
> I don't like to update the module for different python and the module
>
> Currently, I am writing the interface to
> iup(http://www.tecgraf.puc-rio.br/iup) via ctypes, but find 2 too
> strange things which have let me feel blue for some days, and I don't
> know whether it can be successful or not. Can anyone give me some
> lights? Thank you. :)
>
> You can download the files 
> athttp://pyguiviactypes.googlepages.com/mini_bug.zip
> I am using python 2.5.1 on win2k with sp4
>



While wxPython may not be pure (per se), it DOES offer some MDI
interfaces. And it works with 2.3 - 2.5. I would think that that would
be good enough for the purposes you mention in your post.

Mike
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pure Python GUI lib?

2007-12-22 Thread Martin v. Löwis
> For the word "Pure", I mean it is not a C/C++/Z++.. extension, so that
> we can use it under  pythons of different version. Is it possible?

The python-xlib project provides such a module. It implements the X11
protocol directly.

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Pure Python GUI lib?

2007-12-22 Thread oyster
For the word "Pure", I mean it is not a C/C++/Z++.. extension, so that
we can use it under  pythons of different version. Is it possible?
I don't like to update the module for different python and the module

Currently, I am writing the interface to
iup(http://www.tecgraf.puc-rio.br/iup) via ctypes, but find 2 too
strange things which have let me feel blue for some days, and I don't
know whether it can be successful or not. Can anyone give me some
lights? Thank you. :)

You can download the files at http://pyguiviactypes.googlepages.com/mini_bug.zip
I am using python 2.5.1 on win2k with sp4

1. in iup.py, if I delete
[code]
_IupMap.argtypes= [
  PTR_Ihandle,#ih
 ]
[/code]
then when I choose the menu "MDI-New", no MDI window come out. Why it
behaves like this?

2. for most of the time, I can only choose menu "MDI-New" 3~4 times,
then it crashes with this msg:
[msg]
Traceback (most recent call last):
 File "\loewis\25\python\Modules\_ctypes\callbacks.c", line 206, in
'calling callback function'
 File "mdisample_callback.py", line 372, in mdi_new IupShow(dlg)
 File "H:\my_project\iup4py\mini\iup\iup.py", line 434, in IupShow
 ih,
WindowsError: exception: access violation writing 0x72292AA4
Traceback (most recent call last):
 File "mdisample_callback.py", line 455, in 
   main()
 File "mdisample_callback.py", line 447, in main
   IupMainLoop()
 File "H:\my_project\iup4py\mini\iup\iup.py", line 247, in IupMainLoop
   return _IupMainLoop()
WindowsError: exception: access violation writing 0x9B73F12E
[/msg]

sometimes the above happens when I delete some "???.argtypes=???" form iup.py

3. and some time, python crashes with this msg:
[msg]
Traceback (most recent call last):
 File "mdisample_callback.py", line 455, in 
   main()
 File "mdisample_callback.py", line 447, in main
   IupMainLoop()
 File "H:\my_project\iup4py\mini\iup\iup.py", line 247, in IupMainLoop
   return _IupMainLoop()
WindowsError: exception: priviledged instruction
[/msg]
-- 
http://mail.python.org/mailman/listinfo/python-list