"Simon Strobl" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Any hints?
For future reference, I would consider using sample data in the file itself
for debugging -- to separate an algorithm problem from a file problem:
|
|
| #!/u
> You musts have missed the memo. The rules of the universe
> changed at 0834 UST yesterday, and all functioning Python programs
> stopped working.
As always, the rules of the universe have not changed. (Or, at least,
I do hope so.)
It seems that the cause of my problem was my switching too fast
On Apr 23, 1:22 pm, Bruno Desthuilliers wrote:
> kdwyer a écrit :> On Apr 23, 12:16 pm, Simon Strobl <[EMAIL PROTECTED]> wrote:
> (snip)
> >> #!/usr/bin/python
>
> >> import sys
>
> >> frqlist = open('my_frqlist.txt', 'r')
> (snip)
> >> frq = {}
>
> >> for line in frqlist:
> >> line = line.rst
kdwyer a écrit :
On Apr 23, 12:16 pm, Simon Strobl <[EMAIL PROTECTED]> wrote:
(snip)
#!/usr/bin/python
import sys
frqlist = open('my_frqlist.txt', 'r')
(snip)
frq = {}
for line in frqlist:
line = line.rstrip()
frequency, word = line.split('|')
frq[word] = int(frequency)
(snip
Simon Strobl wrote:
Hello,
the idea of the following program is to parse a frequency list of the
form FREQUENCY|WORD, to store the frequency of a word in a dictionary
(and to do some things with this information later).
I have done this many many times. Suddenly, it does not work any more:
The
On Apr 23, 12:16 pm, Simon Strobl <[EMAIL PROTECTED]> wrote:
> Hello,
>
> the idea of the following program is to parse a frequency list of the
> form FREQUENCY|WORD, to store the frequency of a word in a dictionary
> (and to do some things with this information later).
>
> I have done this many ma
On Apr 23, 1:16 pm, Simon Strobl <[EMAIL PROTECTED]> wrote:
> Hello,
>
> the idea of the following program is to parse a frequency list of the
> form FREQUENCY|WORD, to store the frequency of a word in a dictionary
> (and to do some things with this information later).
>
> I have done this many man
Simon Strobl wrote:
> the idea of the following program is to parse a frequency list of the
> form FREQUENCY|WORD, to store the frequency of a word in a dictionary
> (and to do some things with this information later).
>
> I have done this many many times. Suddenly, it does not work any more:
> T
Hello,
the idea of the following program is to parse a frequency list of the
form FREQUENCY|WORD, to store the frequency of a word in a dictionary
(and to do some things with this information later).
I have done this many many times. Suddenly, it does not work any more:
The value frq[key] is diff