473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Interfacing my chess client with GNU chess using python

Hello,
I have written a chess client using python which is a graphic
interface to play chess. It is at present a two player version,
players move their peices by clicking two squares on the board as
in any other chess clients.
Now i want to interface my program with the already available
gnuchess program. Basically i want to feed the user input to the
gnuchess and get the output and then display in my GUI. I have read
about Popen but i couldn't figure out how to do it. Is there any
other better ways of doing it. Any help would be appreciated.

--
-----8<----------8<----------8<----------8<----
Varun Hiremath
Undergraduate Student,
Aerospace Engg. Department,
Indian Institute of Technology Madras,
Chennai, India
-----------------------------------------------
Webpage : http://www.ae.iitm.ac.in/~ae03b032
-----------------------------------------------

Sep 18 '06 #1
1 2458

Varun Hiremath wrote:
Hello,
I have written a chess client using python which is a graphic
interface to play chess. It is at present a two player version,
players move their peices by clicking two squares on the board as
in any other chess clients.
Now i want to interface my program with the already available
gnuchess program. Basically i want to feed the user input to the
gnuchess and get the output and then display in my GUI. I have read
about Popen but i couldn't figure out how to do it. Is there any
other better ways of doing it. Any help would be appreciated.
The subprocess module may help you...

http://docs.python.org/dev/lib/module-subprocess.html
Will McGugan
--
http://www.willmcgugan.com

Sep 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Elaine Jackson | last post by:
I'm about to tackle tkinter, but here's the thing: The only kind of GUI I want to work on is a chessboard (an 8x8 grid of images that can be "moved around"). So before I start, I'm asking the room...
0
by: Gandalf | last post by:
Hi All! I have an interesting problem here. I have written a Delphi program that should connect to a server written in Python. I'm using a package called DCP for encryption in Delphi and the...
12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
5
by: Will McGugan | last post by:
Hi folks, I've written a Python chess module that does the following. * Reads / Writes PGN files * Write FEN files * Validates moves * Lists legal moves * Detects check / mate / stalemate /...
11
by: Gregc. | last post by:
G'day I am writing a chess program. Here is my code: #include <stdio.h> #include <stdlib.h> bool isInCheck (int krow, int kcol, int qrow, int qcol) { double check;
5
by: Paolo Pantaleo | last post by:
Well Python is not a good language for writing a chess engine (even if a chess engine exists: http://www.kolumbus.fi/jyrki.alakuijala/pychess.html), but it could be grat for chess interfaces, for...
2
by: CoreyWhite | last post by:
When playing games, perhaps the most simple is tic-tac-toe. The game has two simple strategies, one is defensive and the other offensive. It is not hard at first to learn how to tie games when...
2
by: shatranjchess | last post by:
I'm releasing a new python chess module called shatranj. You can get it from www.employees.org/~stannous/shatranj until I move the project to sourceforge or some other place. It's a text based...
1
by: Jim Langston | last post by:
Windows. Situation: Using a Python program called OpenRPG. I have a program that displays form data (a character sheet) in C++. I am able in the C++ program to build a string and copy it into the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.