Issue2889: Add Curses for Windows as native module for 2.6

Does anyone would like to include Curses support in Windows from version 2.6? It works ok already using the patch from issue #2889 and PDCurses library, but needs expertise of core developers to integrate the patch into the build system, add library to externals to ship next windows Python with embedded curses support. I would really like to see this as release blocker, because the problem raised once in a while in the past and the windows people who are interested in getting console interface tools usually lack the knowledge of unix platform to do the task. P.S. It is all about cross-platform roguelikes and text-mode players in Python [1] http://bugs.python.org/issue2889 -- --anatoly t.

I would really like to see this as release blocker, because the problem raised once in a while in the past and the windows people who are interested in getting console interface tools usually lack the knowledge of unix platform to do the task.
It certainly can't be a release blocker: there is no accepted PEP demanding it, it does not cause any crashes, and it is no regression over earlier releases. For this to have any chance, it *must* work with Visual Studio. Requiring gcc is unacceptable. Regards, Martin

On Sat, May 24, 2008 at 11:48 AM, "Martin v. Löwis" <martin@v.loewis.de> wrote:
I would really like to see this as release blocker, because the problem raised once in a while in the past and the windows people who are interested in getting console interface tools usually lack the knowledge of unix platform to do the task.
It certainly can't be a release blocker: there is no accepted PEP demanding it, it does not cause any crashes, and it is no regression over earlier releases.
For this to have any chance, it *must* work with Visual Studio. Requiring gcc is unacceptable.
As for PDCurses library itself there is a Makefile in PDCurses distribution for Microsoft Visual C++ 2.0+ named vcwin32.mak I can't afford buying Visual Studio to test if it works with newer versions, but logically Visual Studio should be able to convert Makefile to a newer format. As for extension I've provided .bat file that uses GCC for compilation and I think I have some ancient Visual C++ compiler to make the similar .bat file for cl.exe. But I doubt I'll be able to provide a patch for Python build system to compile the module into windows distribution, because I do not have much experience with Python build system and with C linking/makefiles in general. I know that PDCurses must be added to externals/, but that's all. So even if can test and script Python part I am afraid I need help from someone with experience of Python+Make+Visual Studio. -- --anatoly t.

2008/5/24 techtonik <techtonik@gmail.com>:
For this to have any chance, it *must* work with Visual Studio. Requiring gcc is unacceptable.
As for PDCurses library itself there is a Makefile in PDCurses distribution for Microsoft Visual C++ 2.0+ named vcwin32.mak I can't afford buying Visual Studio to test if it works with newer versions, but logically Visual Studio should be able to convert Makefile to a newer format.
Visual C++ 9.0 Express Edition builds Python quite happily these days. So you can certainly do the integration without buying anything. If you get stuck on technical details, there are people here who would happily give you advice. Windows developers are always welcome!
As for extension I've provided .bat file that uses GCC for compilation and I think I have some ancient Visual C++ compiler to make the similar .bat file for cl.exe. But I doubt I'll be able to provide a patch for Python build system to compile the module into windows distribution, because I do not have much experience with Python build system and with C linking/makefiles in general. I know that PDCurses must be added to externals/, but that's all.
If you don't have the knowledge needed, and can't spare the time to learn (which is entirely acceptable) then you are indeed relying on another Windows developer to pick this up. You may be out of luck there - nobody has been interested enough to do this before now (it's not as if PDCurses is new) so there's not much reason to expect things to have changed. Paul.

On Sat, May 24, 2008 at 3:15 PM, Paul Moore <p.f.moore@gmail.com> wrote:
As for PDCurses library itself there is a Makefile in PDCurses distribution for Microsoft Visual C++ 2.0+ named vcwin32.mak I can't afford buying Visual Studio to test if it works with newer versions, but logically Visual Studio should be able to convert Makefile to a newer format.
Visual C++ 9.0 Express Edition builds Python quite happily these days. So you can certainly do the integration without buying anything. If you get stuck on technical details, there are people here who would happily give you advice. Windows developers are always welcome!
Finally, I've downloaded Microsoft Visual Studio Express 2008, but it requires Windows XP to install and I have only Windows2000 at hand. I will try to get MS Visual Studio Express 2005 and see if it works.
If you don't have the knowledge needed, and can't spare the time to learn (which is entirely acceptable) then you are indeed relying on another Windows developer to pick this up. You may be out of luck there - nobody has been interested enough to do this before now (it's not as if PDCurses is new) so there's not much reason to expect things to have changed.
I'll try to spare the time to learn how to include curses support in windows, but I will appreciate if anybody could review the patches and convert project to MSVC 2008 in the end.
-- --anatoly t.

As for PDCurses library itself there is a Makefile in PDCurses distribution for Microsoft Visual C++ 2.0+ named vcwin32.mak I can't afford buying Visual Studio to test if it works with newer versions, but logically Visual Studio should be able to convert Makefile to a newer format.
You can start with Visual C++ Express, which is compeltely free ;) I don't know if Visual Studio updates the Makefiles. Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher

You can start with Visual C++ Express, which is compeltely free ;) I don't know if Visual Studio updates the Makefiles.
I would like the makefiles to be ignored entirely. Trent has established a policy that we compile everything in a single project file, and while that means some extra work initially, it also has advantages (such as not having to worry about conflicting command line options between the library's build procedure, and Python's). Regards, Martin

As for PDCurses library itself there is a Makefile in PDCurses distribution for Microsoft Visual C++ 2.0+ named vcwin32.mak I can't afford buying Visual Studio to test if it works with newer versions, but logically Visual Studio should be able to convert Makefile to a newer format.
Visual Studio 2008 Express is free of charge; so you should be able to work on this with that release.
So even if can test and script Python part I am afraid I need help from someone with experience of Python+Make+Visual Studio.
Then there is little chance that the patch gets accepted. I will have zero time for this until the beta release, unless the patch just needs to be applied, compiles without changes, and passes it the test suite. Regards, Martin

2008/5/24 techtonik <techtonik@gmail.com>:
Does anyone would like to include Curses support in Windows from version 2.6?
I'd like to see this, although it's hardly crucial for me - however, "from version 2.6" may be unrealistic at this point.
It works ok already using the patch from issue #2889 and PDCurses library, but needs expertise of core developers to integrate the patch into the build system, add library to externals to ship next windows Python with embedded curses support.
One other option would be to pull out the core curses module as an external project (maybe called "pdcurses"), link it with pdcurses and provide Windows binaries - then developers who cared could do try: import curses except ImportError: import pdcurses as curses
I would really like to see this as release blocker, because the problem raised once in a while in the past and the windows people who are interested in getting console interface tools usually lack the knowledge of unix platform to do the task.
No way it's a release blocker - we've lasted this long without it so it's in no way essential for 2.6.
P.S. It is all about cross-platform roguelikes and text-mode players in Python
Cross-platform any sort of console interface more complex than stdin/stdout. But such interfaces are increasingly rare these days... Paul.
participants (4)
-
"Martin v. Löwis"
-
Matthieu Brucher
-
Paul Moore
-
techtonik