[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Python support with windows
From: |
Øystein Johansen |
Subject: |
Re: [Bug-gnubg] Python support with windows |
Date: |
Mon, 22 Mar 2004 16:20:52 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Joern Thyssen wrote:
| On Sun, Mar 21, 2004 at 10:22:12PM +0100, Ã?ystein Johansen wrote
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>Hi,
|>
|>I'm trying to build a GUI verion of gnubg, with python support in on
|>windows. It works in a way, but the main window doesn't react when I'm
|>in Python mode. Can anything be done with this?
|
|
| No, this is a known problem (search the archives). I've tried to fix it,
| but failed. We probably need dual threading with one thread updating the
| GUI and another running the python code.
OK.... I guess we have to live with it, without the GUI being updated then.
| I don't think fork() will help us here as we want the GUI and python
| using the same address space, e.g., changes made through python should
| be visible in the GUI.
fork() is also a small little hell in windows coding.
Other problems....
I can't open idle.
Traceback (most recent call last):
~ File "<string>", line 1, in ?
ImportError: No module named idle.PyShell
Maybe I can open Mark Hammonds PythonWin GUI instead? How can I do that?
Python support only works if I link without the -mwindows option to gcc.
I thought this was because python didn't get a stdin or stdout stream,
and it does run scripts which doesn't use stdin/stdout.
Example:
f = open("hallo.txt","w")
f.write("Hello, from GNU Backgammon!")
f.close()
Run fine from GNU Backgammon, even with -mwindows linked.
Can we write a small GTK window and redirect stdin and stdout to this
window? (a simplified Python GUI)
- -Øystein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAXwRU6kDTFPhwyqYRAqZnAJ9cN/7l5FyUgGpentsXD17Pqx8m1ACdE5b3
lCKc4HvImSTrX9KqltkqMPQ=
=c0zE
-----END PGP SIGNATURE-----