[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Hyphenation module PyHyphen-0.3 released

Dr. leo

2/23/2008 7:35:00 PM

I am pleased to share with you the great features of the latest version.
Large parts of the sources were completely rewritten. Also, they are now
reasonably documented.

Just go to
http://pypi.python.org/pypi/Py...

I was tempted to classify it as Beta. Indeed I am not aware of any bugs, but
I haven't spent very much time for testing, just ran some word lists...

Any feedback is greatly appreciated. Especially I would be interested in
experiences under Windows. I can only test it under Linux.

If there were a good soul to send me a DLL for Windows
(fhaxbox66@googlemail.com) , this would be terrific.

Bests

Leo


4 Answers

thebjorn

2/24/2008 12:53:00 AM

0

On Feb 23, 8:35 pm, "Dr. leo" <fhaxbo...@googlemail.com> wrote:
> I am pleased to share with you the great features of the latest version.
> Large parts of the sources were completely rewritten. Also, they are now
> reasonably documented.
>
> Just go tohttp://pypi.python.org/pypi/Py...
>
> I was tempted to classify it as Beta. Indeed I am not aware of any bugs, but
> I haven't spent very much time for testing, just ran some word lists...
>
> Any feedback is greatly appreciated. Especially I would be interested in
> experiences under Windows. I can only test it under Linux.
>
> If there were a good soul to send me a DLL for Windows
> (fhaxbo...@googlemail.com) , this would be terrific.
>
> Bests
>
> Leo

Looks interesting, and I'd love to provide a .pyd file, however I'm
running into some problems :-( I've got VS 2005 on this machine and
setup-tools is complaining about my Python being built with VS 2003.
(I know what the problem is with intermingling runtime libraries, yet
I can't downgrade my VS version...) I got a message that I could try
using mingw32, so a quick download and the build step seemed to finish
without any problems:

C:\work\PyHyphen-0.3>python setup.py build -c mingw32
running build
running build_py
running build_ext
running build_scripts
creating build\scripts-2.5
copying example.py -> build\scripts-2.5

(I ran build_ext first, which is why there's so little output.) I
copied the dictionary into build\lib.win32-2.5\dict and was able to
import the library without getting any errors and run the example from
http://pypi.python.org/pypi/Py... (from the build directory).
I'm stuck at trying to install the package though...:

C:\work\PyHyphen-0.3>python setup.py install
running install
running build
running build_py
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate
compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to
setup.py.

C:\work\PyHyphen-0.3>python setup.py install -c mingw32
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
[cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'mingw32'

I don't know if I'm just doing it wrong, or if I can't use extensions
compiled with mingw32 with the standard distribution Python
executable?

-- bjorn

Max Erickson

2/24/2008 2:56:00 AM

0

thebjorn <BjornSteinarFjeldPettersen@gmail.com> wrote:
> Visual Studio 2003 was not found on this system. If you have
> Cygwin
> installed,
> you can try compiling with MingW32, by passing "-c mingw32" to
> setup.py.
> -- bjorn

You need to convince MingW to use the correct VS runtime. Cribbing
from:

http://www.develer.com/oss/GccW...

the easy way to do this might be to find(in your mingw /lib directory)
and copy or rename libmsvcr71.a and libmsvcr71d.a into libmsvcrt.a and
libmsvcrtd.a (backing up the originals if desired). If the MingW you
have installed doesn't provide the appropriate runtime, you would have
to track that down.

The MingW/GCC package from the linked page provides a utility to do
this, but it is a tossup/up to you if the version of GCC provided is
suitable for 'production' use.


max

Ivan Illarionov

2/25/2008 2:57:00 AM

0

> I don't know if I'm just doing it wrong, or if I can't use extensions
> compiled with mingw32 with the standard distribution Python
> executable?

I was able to install on Windows XP with mingw:

setup.py build -c mingw32
setup.py install --skip-build

It works fine with English dictionary, but hangs with Russian
dictionary from Mozilla.

thebjorn

2/25/2008 11:59:00 PM

0

On Feb 25, 3:56 am, Ivan Illarionov <ivan.illario...@gmail.com> wrote:
> > I don't know if I'm just doing it wrong, or if I can't use extensions
> > compiled with mingw32 with the standard distribution Python
> > executable?
>
> I was able to install on Windows XP with mingw:
>
> setup.py build -c mingw32
> setup.py install --skip-build
>
> It works fine with English dictionary, but hangs with Russian
> dictionary from Mozilla.

This is unfortunately deceptive :-( The C-runtime mismatch problem
happens when memory malloc'd in an extension module is free'd by the
interpreter (or vice versa). Things might work for a while with this
mismatch, but will (almost) always crash/hang/etc. in hard to track
down ways later.

Using the link that max provided above, I managed to build and install
without passing any switches and getting no error messages.

-- bjorn