rajrakeshdr / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Win32 package #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which the possibility for future to make a package for Windows platform?

Using pygobject, pycairo, pygtk, py2exe and nsis as the installer is not
very difficult. But it has modules in pychess that they only function in Linux.

Original issue reported on code.google.com by leogregianin@gmail.com on 27 Sep 2007 at 12:30

GoogleCodeExporter commented 9 years ago
I've never developed for Windows, so I can't say for sure.
However I'm certain that windows would need an alternative engine system.
Perhaps first creating a such, and then take out bugs as they appear?

If you'd like to investigate the possibility, feel free to ask questions :)
Doesn't gnome-games run on windows? Or is it only Solaris..

Original comment by lobais on 27 Sep 2007 at 2:42

GoogleCodeExporter commented 9 years ago
Now, only Aisleriot port for Windows http://live.gnome.org/GnomeGames/Windows

I go to make the installer for the Windows, and report the problems that to 
appear.

Original comment by leogregianin@gmail.com on 27 Sep 2007 at 3:37

GoogleCodeExporter commented 9 years ago
Hi,
This is the message of the console:

(...)
*** copy data files ***
copying C:\Python25\lib\site-packages\py2exe\run_w.exe -> C:\Documents and Setti
ngs\Administrador\Desktop\pychess\trunk\dist\Main.exe

The following modules appear to be missing
['System.ThreadPool', 'email.Generator', 'email.Iterators', 'email.Utils', 'gdk'
, 'gst', 'gtksourceview', 'ltihooks', 'pychess.Utils.History', 'pygst', 'pysqlit
e2.dbapi2', 'resource', 'cairo.ImageSurface', 'gobject.GObject', 'gobject.SIGNAL
_RUN_FIRST', 'gtk.DEST_DEFAULT_DROP', 'gtk.DEST_DEFAULT_HIGHLIGHT', 'gtk.DEST_DE
FAULT_MOTION', 'gtk.ICON_LOOKUP_USE_BUILTIN']

and the log error:
Traceback (most recent call last):
  File "Main.py", line 9, in <module>
  File "pychess\System\conf.pyo", line 10, in <module>
  File "pychess\System\conf_configParser.pyo", line 2, in <module>
  File "pychess\System\Log.pyo", line 4, in <module>
  File "pychess\System\prefix.pyo", line 41, in <module>
  File "os.pyo", line 429, in __getitem__
KeyError: 'HOME'

"HOME" doesn't exist in win32 platform :-)

Original comment by leogregianin@gmail.com on 23 Nov 2007 at 12:25

GoogleCodeExporter commented 9 years ago
I see.
Try out os.path.expanduser("~")
If it works, we can add:
os.environ["HOME"] = os.path.expanduser("~")
in the start script.

Original comment by lobais on 23 Nov 2007 at 2:10

GoogleCodeExporter commented 9 years ago
I put os.environ["HOME"] = os.path.expanduser("~") in prefix.py and
conf_configParser.py ok.

1. Main.py:
from pychess.System import conf, glock
try:
    from pychess.System import gstreamer
except ImportError:
    print 'pygst don\'t installed'
    pass 

because I don't need porting gstreamer to windows.

the gettext problem (include in Main.py):
from pychess.System.prefix import addDataPrefix, getDataPrefix, isInstalled
import gettext, gtk.glade
if isInstalled():
    gettext.install("pychess", unicode=1)
    gtk.glade.bindtextdomain("pychess")
else:
    gettext.install("pychess", localedir=addDataPrefix("lang"), unicode=1)
    gtk.glade.bindtextdomain("pychess", addDataPrefix("lang"))
gtk.glade.textdomain("pychess")

win32 package first run lib/pychess/Main.py and the gettext in trunk/pychess.

const.py (getuid and getpwuid run only UNIX):
try:
    from os import getuid
    from pwd import getpwuid
    userdata = getpwuid(getuid())
    i = userdata.pw_gecos.find(',')
    if i >= 0:
        username = userdata.pw_gecos[i:]
    else: username = userdata.pw_name
    del userdata, i
except:
    pass

widgets/gamewidget.py (another gstreamer):
from pychess.System import glock, conf
try:
    from pychess.System import gstreamer
except:
    pass

and log error, fcntl run only UNIX:
Traceback (most recent call last):
  File "Main.py", line 28, in <module>
  File "pychess\Players\Human.pyo", line 7, in <module>
  File "pychess\widgets\gamewidget.pyo", line 66, in <module>
  File "pychess\widgets\BoardControl.pyo", line 8, in <module>
  File "pychess\Utils\Cord.pyo", line 1, in <module>
  File "pychess\Utils\lutils\lmove.pyo", line 5, in <module>
  File "pychess\Utils\lutils\ldata.pyo", line 3, in <module>
  File "pychess\Utils\lutils\bitboard.pyo", line 1, in <module>
ImportError: No module named fcntl

Original comment by leogregianin@gmail.com on 23 Nov 2007 at 4:42

GoogleCodeExporter commented 9 years ago
another try..except in conf_configParser.py:
try:
    atexit.register(lambda: configParser.write(open(path,"w")))
except:
    pass

Log error:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "atexit.pyo", line 24, in _run_exitfuncs
  File "pychess\System\conf_configParser.pyo", line 12, in <lambda>
IOError: [Errno 13] Permission denied: 'C:\\Documents and 
Settings\\Administrador'

Original comment by leogregianin@gmail.com on 23 Nov 2007 at 4:53

GoogleCodeExporter commented 9 years ago
1) I don't think you should try...catch gstreamer in Main.py. Better put it in 
the
gstreamer module.

2) Can you try to explain the gettext problem again? Does the windows package 
run
Main.py before trunk/pychess?

3) http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66314 seams to have a
solution for getting username on windows. Either use a try...catch or a "if 
'nt' in
sys.platform"

4) We could either make the windows version star slower, by removing some of the
asynchronous reading from the file, or perhaps the fcntl process locking could 
be
substituted by some of this: http://en.wikipedia.org/wiki/File_locking

5) The configParser.write problem, seams to merely be a HOME issue than an 
issue that
should be try...catched.

Original comment by lobais on 25 Nov 2007 at 2:58

GoogleCodeExporter commented 9 years ago
Just committed a minimal patch to start win32 support.
Now "python setup.py install" is ok on windows.

After starting it with "python pychess" in c:\Python25\scripts dir, it gives a
traceback telling that (the select) "module object has no attribute poll".

(Maybe the gstreamer module can be substituted with winsound module on win32.)

Original comment by gbtami on 25 Nov 2007 at 6:23

GoogleCodeExporter commented 9 years ago
Super. windsound sounds good.

An idea:
if sys.platform == "win32":
    from os.path import dirname, abspath
    python_path = os.path.join(dirname(abspath(sys.executable)), python")
else:
    python_path = searchPath("python")
Perhaps it would be nicer to add the win32 fix in searchPath rather than where 
it is
used?

On the poll thing, does anybody know how windows poll pipes, if their select 
and poll
only works on sockets?

Original comment by lobais on 25 Nov 2007 at 6:47

GoogleCodeExporter commented 9 years ago
Fixed the fix in rev 782 :)

Original comment by gbtami on 25 Nov 2007 at 7:14

GoogleCodeExporter commented 9 years ago
Hi All

 I did a windows installer for a Python project using Py2exe 
(http://code.google.com/p/gmapcatcher/) it is a lot simpler than pyChess, I 
thought 
that I could give you guys a hand making a windows installer, it seems that 
this 
project has a LOT more dependencies than GMapCatcher...

 To start I set up Python 2.5 in a fresh Win XP and installed the requirements listed 
in setup_win32.py, it was missing "gtksourceview" I download it from here:
 http://ftp.gnome.org/pub/gnome/binaries/win32/ 
But no luck! 

Has anyone been able to compile this lately?

Original comment by heldersepu on 17 Jul 2009 at 5:23

GoogleCodeExporter commented 9 years ago
Hi Heldersepu,

It would be great to have someone give PyChess for Windows another go. It's 
been a
while since somebody worked on that (leogregianin did).

What kind of problems does gtksourceview give you? Perhaps the setup_win32.py 
depends
on gtksourceview1 rather than 2. PyChess supports both though.

If the sourceview is a great trouble, we could make it optional. It isn't used 
very
heavily in the app.

You can also try to write on the mailinglist if there are other things you need 
to
know and discuss (there surely will be)

Cheers, Thomas

Original comment by lobais on 31 Jul 2009 at 12:49

GoogleCodeExporter commented 9 years ago
Hallo Thomas

 Attached you can find some of the problems with gtksourceview. It seems that
setup_win32.py depends on gtksourceview1 but for debugging purposes I'm trying 
to run
pychess directly.

 I will try removing all the "sourceview" dependencies see if compiles in that way...

I'm glad I can help
Helder

Original comment by heldersepu on 31 Jul 2009 at 1:04

Attachments:

GoogleCodeExporter commented 9 years ago
I commented all the "sourceview" dependencies, but I'm still getting errors...
ImportError: No module named rsvg

this might be a solution:
http://cairographics.org/cairo_rsvg_and_python_in_windows/

Original comment by heldersepu on 19 Aug 2009 at 1:43

GoogleCodeExporter commented 9 years ago
Rsvg is used in the Throbber (which appears at discovering) and in the pydock 
(which
appears when you move around panels).
We use rsvg like this:

def __loadSvg (self, path, width, height):
    svg = rsvg.Handle(path)
    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
    context = cairo.Context(surface)
    context.set_operator(cairo.OPERATOR_SOURCE)
    if svg.props.width != width or svg.props.height != height:
        context.scale(width/float(svg.props.width),
                      height/float(svg.props.height))
    svg.render_cairo(context)
    return surface

Your wrapper seams to handle all functions used in this case, so I say you 
should try
copying it in.
At first you will need to copy it into lib/pychess/widgets/Throbber.py as well 
as
lib/pychess/widgets/pydock/OverlayWindow.py. If it works well, we can factor it 
into
some svg module.

Original comment by lobais on 19 Aug 2009 at 6:11

GoogleCodeExporter commented 9 years ago
After copying the wrapper to both of the files that error is gone. 
but now I get new error:
gobject.GError: Icon 'weather-clear' not present in theme

I try commenting the "erroneous" lines but it seems the icons are used 
everywhere!
Attached is the full output of the error

In the error there is something about theme not found & You can get a copy 
from: 
http://icon-theme.freedesktop.org/releases

I downloaded & extracted the files but don't know what to do with them

Original comment by heldersepu on 16 Sep 2009 at 1:21

Attachments:

GoogleCodeExporter commented 9 years ago
Trying to install pygtksourceview for win32: 
http://ftp.gnome.org/pub/gnome/binaries/win32/pygtksourceview/

Original comment by leogregianin@gmail.com on 5 Sep 2010 at 3:38

GoogleCodeExporter commented 9 years ago
I have tried to install it on Windows 7 under Python 2.6 and 2.7

- Got GTK+ 2.22 bundle from http://www.gtk.org/download-windows.html and 
installed into C:\GTK
- Upated Windows PATH env variable:  PATH=C:\GTK\bin;%PATH%
- Installed PyCairo, PyObject, PyGDK from 
http://ftp.gnome.org/pub/GNOME/binaries/win32/
- checked that following works:  
import gobject
import gtk
import glib
from glib._glib import *
import cairo

Run python setup.py install and got the error (different for Python 2.6 and 
2.7):
On Python 2.7.1 the error is:
Traceback (most recent call last):
  File "setup.py", line 103, in <module>
    msgfmt.make(file+".po", file+".mo")
  File "c:\python27\tools\i18n\msgfmt.py", line 174, in make
    l = eval(l)
  File "<string>", line 1
    "Copy text   \t
                  ^
SyntaxError: EOL while scanning string literal
------------
On Python 2.6.4
Traceback (most recent call last):
  File "setup.py", line 103, in <module>
    msgfmt.make(file+".po", file+".mo")
  File "C:\Python26\tools\i18n\msgfmt.py", line 151, in make
    l = eval(l)
  File "<string>", line 1
    _plural "There are %d games with unsaved moves."
                                                  ^
SyntaxError: invalid syntax
---------------------------------------
- Commented out in setup.py lines #103 and #106:
msgfmt.make(file+".po", file+".mo")
DATA_FILES += [("share/locale/"+dir+"/LC_MESSAGES", 
["lang/"+dir+"/"+pofile+".mo"])]
- Run python setup.py install again - no errors reported.
- downloaded testing folder from trunk
- run python test/run_tests.py
got error: lib\pychess\System\Log.py", line 57, in _format
    t = time.strftime ("%T")
ValueError: Invalid format string
Googled and found that instead "%T" in line above should be "%H:%M:%S"

Fixed it in Log.py an run again:
The following tests failed (difference in YEAR format YY versus YYYY):

FAIL: test1 (ficsmanagers.AdjournManagerTests)
Testing an advanced line
-    'time': '12/23/09 06:58'}],)
+    'time': '12/23/2009 06:58'}],)

FAIL: test2 (ficsmanagers.AdjournManagerTests)
Testing a double line
-    'time': '11/23/97 06:14'},
+    'time': '11/23/1997 06:14'},

-    'time': '01/11/09 17:40'}],)
+    'time': '01/11/2009 17:40'}],)

FAIL: test1 (ficsmanagers.GameListManagerTests)
Seek add
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\2001-MARCH\pychess-0.10\test\ficsmanagers.py", line 171, in test1
    self.runAndAssertEquals(signal, lines, (expectedResult,))
  File "C:\2001-MARCH\pychess-0.10\test\ficsmanagers.py", line 53, in runAndAsse
rtEquals
    self.assertEqual(self.args, expectedResults)
AssertionError: Tuples differ: ({'rt': '1291', 'rmin': '1200'... != ({'rmax': 
'1400', 'cp': False,...

First differing element 0:
{'rt': '1291', 'rmin': '1200', 'title': '', 'i': '0', 'manual': False, 'rmax': '
1400', 'gameno': '10', 'tp': 'Blitz', 'r': 'r', 't': '3', 'w': 'warbly', 'cp': 
False}
{'rmax': '1400', 'cp': False, 'rt': '1291', 'rmin': '1200', 'i': '0', 'manual':
False, 'gameno': '10', 'tp': 'Blitz', 'r': 'r', 't': '3', 'w': 'warbly'}

  ({'cp': False,
    'gameno': '10',
    'i': '0',
    'manual': False,
    'r': 'r',
    'rmax': '1400',
    'rmin': '1200',
    'rt': '1291',
    't': '3',
-   'title': '',
    'tp': 'Blitz',
    'w': 'warbly'},)

--------------------
Also I o run 
python lib/pychess/Players/PyChess.py
And get error at this line   
\pychess-0.10\lib\pychess\System\prefix.py", line 50, in __get_user_dir
    directory = join(os.environ["HOME"], fallback_dir_path)
I tried this workaround:
set HOME=c:\
and run again: python lib/pychess/Players/PyChess.py
I got:
feature done=0

At this point application wait for valid moves, I do not know what to type here.
Any ideas?

Original comment by mlubin...@gmail.com on 21 Mar 2011 at 5:04

GoogleCodeExporter commented 9 years ago
Update to the last line in my previous post: I figured out that are the valid 
commands:
 I typed "go" and got back "move d4" , I typed "go" one more time and got "move Nf6"
etc.

Original comment by mlubin...@gmail.com on 21 Mar 2011 at 5:26

GoogleCodeExporter commented 9 years ago
Thx. for your test!

I run into msgfmp.py error with Python 2.6.6 too. Not tested with 2.7 yet.
They fixed it: http://bugs.python.org/issue5464

This is interesting:
got error: lib\pychess\System\Log.py", line 57, in _format
    t = time.strftime ("%T")
ValueError: Invalid format string

Python docs doesn't mention %T, but I got no error running tests on my XP.

Our main problem with win32 port described in mailing list:

>> There has been work in the past, on porting PyChess to Windows.
>> The main issue is the process model, which is different / worse from
>> unix systems.

> I talked about this with Matt, and he pointed to the root of our problem:
> http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp

I see.
I guess we could switch all the code back to using idle_add, but we
did switch away from it, because it gave problems. There is a chance
these problems in gtk are fixed, but who knows.
Another possibility could be to make them interchangeable some way.
Anyway I think it would require some overall rewrite of the way we use
threading. Then again, that is one of our high priorities anyway.

Original comment by gbtami on 21 Mar 2011 at 12:01

GoogleCodeExporter commented 9 years ago
You said: 
"Python docs doesn't mention %T, but I got no error running tests on my XP"
It depends from Python version: for 2.6 it returns '', for 2.7 it raises the 
error

Original comment by mlubin...@gmail.com on 21 Mar 2011 at 6:53

GoogleCodeExporter commented 9 years ago
Fixed in rev 951b4a66185c. Thx!

Original comment by gbtami on 21 Mar 2011 at 8:26

GoogleCodeExporter commented 9 years ago
I have found the reason why setup.py failed on  line 103:
    msgfmt.make(file+".po", file+".mo")

It is because the Swedish translation does not have pychess.mo file in folder 
lang/sv/LC_MESSAGES/pychess/

I just removed the folder lang/sv/ completely and rerun setup.py install 
without problems.

Original comment by mlubin...@gmail.com on 21 Mar 2011 at 9:58

GoogleCodeExporter commented 9 years ago
Current show stopper: in file Utils\book.py the error happened on line: 
from pychess.Utils.History import History
ImportError: No module named History

Any ideas?

Original comment by mlubin...@gmail.com on 22 Mar 2011 at 12:29

GoogleCodeExporter commented 9 years ago
The following statement exists  2 times in Utils\book.py (lines #36 and #145)

if __name__ == "__main__":

Also the variable PROFILE is not defined but is used on line #146
    if not PROFILE:
        remake()

Original comment by mlubin...@gmail.com on 22 Mar 2011 at 12:44

GoogleCodeExporter commented 9 years ago
Most of book.py is outdated. It is code used to generate the opening book, 
which currently isn't accessible to the user. Additionally Justin Blanchard is 
working on making it all obsolete.

Bottom line: Anything that isn't getOpenings or used by it, you can safely 
remove.

Original comment by lobais on 22 Mar 2011 at 7:13

GoogleCodeExporter commented 9 years ago
In addition to my comment 23: Swedish translation file 
\sv\LC_MESSAGES\pychess.po should be fixed: specifically  lines 221-223 contain 
garbage which causing the setup.py failure:

 "Copy text   \t
\n"
"Chattar"

Original comment by mlubin...@gmail.com on 23 Mar 2011 at 12:50

GoogleCodeExporter commented 9 years ago
In addition to comment 21: the same issue should be fixed in file 
widgets\LogDialog.py
line 74: instead %T should be %H:%M:%S  
wrong line:            t = time.strftime("%T",time.localtime(timestamp))
fixed line:            t = time.strftime("%H:%M:%S",time.localtime(timestamp))

Original comment by mlubin...@gmail.com on 23 Mar 2011 at 3:44

GoogleCodeExporter commented 9 years ago
In addition to my comment 23: 
remove garbage in line 618-619; 942-.. in file \sv\LC_MESSAGES\pychess.po
"Copy text   \t"   <--- this is an issue.
It breaks setup.py install as I described before

Original comment by mlubin...@gmail.com on 23 Mar 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Follow-up  to my comment 18: I finally got Welcome-Pychess main window!
Instead first 3 steps described in comment #18 I used pygtk-all-in-one 
installer: 
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6
.win32-py2.6.msi (also there is a version for Python 2.7)
It is important to read first 
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.22/pygtk-all-in-one.README

Also fixes for strftime("%T") should be applied in LogDialog.py and Log.py 
files and \sv\LC_MESSAGES\pychess.po  should be fixed.

From Welcome-Pychess there are 2 options:
Option 1: Start Game
  Opponent: human being (drop down has no other options - why?)
In file ionest.py, line #80, I found that the following list is empty
      anaengines = list(discoverer.getAnalyzers())
and on line 83 it fails: Index Error - list index out of range
   if engine is None: engine = anaengines[0]

I dig into engineNest.py to understand how to fix it, but I need help from 
somebody here. Please explain me how to configure local chess engine to be 
recognized by engineNest!

Option 2: Connect to FICS
 I tried connect to FICS as guest: I got 2  additional windows
one named "Connect to Internet Chess" with nice Earth picture and after few sec 
the 2nd window appeared "Internet Chess: FICS" which is totally white inside. 
Both windows are having line "Not Responding" in the title. So I have to kill 
both.

Original comment by mlubin...@gmail.com on 23 Mar 2011 at 5:50

GoogleCodeExporter commented 9 years ago
mlubin: Congratulations on getting it up running!

On your question: PyChess expects there to always be at least one engine, 
namely the PyChess chess engine. It sounds to me like it has failed being 
initialized by engineNest. Have you checked if you can run it stand alone? (see 
the INSTALL file).

In general the engines.xml file is used to configure local engines. The script 
uses the system path a lot, I don't know if that might introduce troubles under 
windows.

Original comment by lobais on 23 Mar 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Fixed the strftime() param and sv garbage bugs. Thx!

I think you arrived to the main problem here.
PyChess failed to discover engines (we have at least 1, pychess own engine).
The reason is here:
http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp
As Thomas said we tried method 1. before, but had problems. Now we use method 
2., but this failed in win32.

Original comment by gbtami on 23 Mar 2011 at 7:51

GoogleCodeExporter commented 9 years ago
The issue mentioned in comment #28 aslo should be fixed in ChatView.py lines 
#106 and #116

Original comment by mlubin...@gmail.com on 23 Mar 2011 at 7:19

GoogleCodeExporter commented 9 years ago
Fixed in hg. Thx!

Original comment by gbtami on 23 Mar 2011 at 8:49

GoogleCodeExporter commented 9 years ago
The default PyChess.py engine is not picked up because in the engineNest.py the 
method
__findRundata the variable altpath always become  None:

        if engine.find('vm') is not None:
            altpath = engine.find('vm').find('path')  # this returns None !

I do not understand what .find('path') stands for in line abobe. 
Any idea how to fix it?

Original comment by mlubin...@gmail.com on 24 Mar 2011 at 4:50

GoogleCodeExporter commented 9 years ago
Fixed in hg. Thx!

Original comment by gbtami on 24 Mar 2011 at 11:46

GoogleCodeExporter commented 9 years ago
Tested with latest engineNest.py code on Windows XP. Previous error gone, I got 
this error down the road:
  File "SubProcess.py", line 94, in _initChannel
    channel.set_flags(gobject.IO_FLAG_NONBLOCK)
<class 'glib.GError'> Not implemented on Win32
Looked on set_flags doc here 
http://library.gnome.org/devel/gtkmm/2.21/classGtk_1_1Widget.html  - this 
method marked as deprecated.
Also looked on valid WidgetsFlags 
http://library.gnome.org/devel/gtkmm/2.21/group__gtkmmEnums.html#ga3d42e9e6671e4
8764b3b42bcc8da0b47 
and Googled - looks like we do not need to call 
channel.set_flags(gobject.IO_FLAG_NONBLOCK) on Windows at all: this is default 
behavior.

So I commented this line in SubProcess.py and rerun. I got next error dump:
------------------
debug: xboard
debug:
debug: protover 2
debug:
warn: Got timeout error
13:58:22 ('Python.exe', '13:03:12.829') Warning: Got timeout error
debug: quit
debug:
  threading.py", line 503, in __bootstrap  self.__bootstrap_inner()
  threading.py", line 530, in __bootstrap_inner    self.run()
  ThreadPool.py", line 76, in run    self.func()
  ThreadPool.py", line 49, in <lambda>   a.func = lambda: func(*args, **kw)
  engineNest.py", line 444, in run    self.__discoverE(engine)
  engineNest.py", line 257, in __discoverE    subproc.start()
  CECPEngine.py", line 169, in start    self.__startBlocking()
  CECPEngine.py", line 183, in __startBlocking   self.emit("readyForOptions")
  engineNest.py", line 274, in __discoverE2    exitcode = subproc.kill(UNKNOWN_REASON)
  CECPEngine.py", line 249, in kill    self.engine.gentleKill()
  SubProcess.py", line 193, in gentleKill    pool.start(self.__gentleKill_inner, first, second)
  SubProcess.py", line 196, in __gentleKill_inner    self.resume()
  SubProcess.py", line 217, in resume    self.sendSignal(signal.SIGCONT)
<type 'exceptions.AttributeError'> 'module' object has no attribute 'SIGCONT'
Save xml C:\Documents and Settings\lubinsky\Application Data\pychess\engines.xml
debug: nopost
debug:
error: Invalid argument. Last line wasn't sent.
--------------------------------------------------------

From http://docs.python.org/library/signal.html I see that SIGCONT is not valid 
argument on Windows:
On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, 
SIGSEGV, or SIGTERM. 

Any idea how to fix it?

Original comment by mlubin...@gmail.com on 24 Mar 2011 at 9:33

GoogleCodeExporter commented 9 years ago
SIGPAUSE/SIGCONT are used for pausing and resuming a process. I did a bit of 
searching, but there doesn't seam to be an api way in Windows to do this.

You can try to search as well. There were some ideas around.

Alternatively I think the engine api's will still work, even if the processes 
aren't actually paused. Maybe some bad engines will have problems, and we'll 
probably have a large cpu usage when a game is paused, but you could give it a 
try and comment the lines out.

Original comment by lobais on 24 Mar 2011 at 10:36

GoogleCodeExporter commented 9 years ago
I commented out the calls signal.SIGCONT but it does not help :( 
Here is the dump with some my print statements:

subrocess init path= C:\Python27\python.exe
subrocess init self.defname= ('Python.exe', '16:03:14.448')
subrocess argv= ['C:\\Python27\\python.exe', '-u', 
'C:\\Python27\\lib\\site-packages\\pychess\\Players\\PyChess.py
C:\Python27\lib\site-packages\pychess\System\SubProcess.py:77: Warning: passing 
a child setup function to the g_spawn functions is pointless on Windows and it 
is ignored
  flags=gobject.SPAWN_DO_NOT_REAP_CHILD|gobject.SPAWN_SEARCH_PATH)

__startBlocking Queue.Empty
warn: Got timeout error
16:54:54 ('Python.exe', '16:03:14.448') Warning: Got timeout error
func kill
debug: quit
debug:
 DO NOT CALL SIGCONT
Save xml C:\Documents and Settings\lubinsky\Application Data\pychess\engines.xml
warn: Chan closed for 'nopost'
16:54:54 ('Python.exe', '16:03:14.448') Warning: Chan closed for 'nopost'
warn: Chan closed for '\n'
16:54:54 ('Python.exe', '16:03:14.448') Warning: Chan closed for '\n'
end func __discoverE

Original comment by mlubin...@gmail.com on 25 Mar 2011 at 12:33

GoogleCodeExporter commented 9 years ago
The latest all-in-one-runtime is for 2.24.x now:
http://ftp.gnome.org/pub/gnome/binaries/win32/pygtk/2.24/

Original comment by gbtami on 24 Jun 2013 at 11:56