[TriZPUG] A beginners question I am sure

Ken M ken at mack-z.com
Sun Apr 3 00:37:22 CEST 2011


OK so working on a project (just started) that is for my own academic
purposes for now.  Just trying to train myself in python.  The attached
code snippet is to convert the websters dictionary (grab specific
components) and insert them in a pipe delimmited data file for now.
Next will be to a database.

When I ran this for a 4.5 MB snippet of the file it worked fine, output
file generated output good.  However when I run it for the entirety of
the webster.txt file (45 MB) the program runs (well more apropos ends
without any error message to me) but the output file I am creating is
empty (0 bytes).

The purpose for now is to build a subset dictionary file that is nothing
more than word and the single letter initialism for word type (n = noun,
v = verb, etc.)  Would appreciate insight into why this is not running
to completion.  If anyone cares to know, I am running this on a Fedora
14 box, I edit and created my .py file with vim and my python
installation is python-2.7-8.fc14.1.i686 (output from rpm -q python).

Thanks in advance,
Ken

P.S.  To save bandwidth I did not attach the webster.txt file however if
anyone wanted to run this against it themselves it can be acquired
through the Project Gutenberg site.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dictconvert.py
Type: text/x-python
Size: 766 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/trizpug/attachments/20110402/7e1f179b/attachment.py>


More information about the TriZPUG mailing list