User Profile

Collapse

Profile Sidebar

Collapse
frozz85
frozz85
Last Activity: Oct 5 '08, 09:11 PM
Joined: Sep 24 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • frozz85
    replied to word frequency
    From stephen.marquar d@uct.ac.za Sat Jan 5 09:14:16 2008
    Return-Path: <postmaster@col lab.sakaiprojec t.org>
    Received: from murder (mail.umich.edu [141.211.14.90])
    by frankenstein.ma il.umich.edu (Cyrus v2.3.8) with LMTPA;
    Sat, 05 Jan 2008 09:14:16 -0500
    X-Sieve: CMU Sieve 2.3
    Received: from murder ([unix socket])
    by mail.umich.edu (Cyrus v2.2.12) with LMTPA;
    Sat, 05 Jan 2008 09:14:16...
    See more | Go to post

    Leave a comment:


  • frozz85
    started a topic word frequency

    word frequency

    I'm trying to print email address and each of their frequency on it's right by reading a text file. The counting part is correct but it prints other things as well. I'm not sure how to solve this. Hope someone could enlighten me. Thank you very much.

    Code:
    import string
    fname = raw_input("Enter a file name: ")
    if len(fname) == 0 :
    	print "Assuming mbox-short.txt"
    	fname = "mbox-short.txt"
    ...
    See more | Go to post

  • Thank you so much!! :) I'm just a beginner, so I don't know the library sys yet. But it helps! Thank you!...
    See more | Go to post

    Leave a comment:


  • frozz85
    started a topic Search for a word from a text file and count

    Search for a word from a text file and count

    I need to search through the file and look for lines that begin with "From". I need to parse the From line and print out the second word for each From line and then also count the number of From lines and print out a count at the end. I'm not sure what to do. Any help is appreciated.

    Code:
    import string
    fname = raw_input("Enter a file name: ")
    
    try:
       infile = open(fname, "r")
    ...
    See more | Go to post
No activity results to display
Show More
Working...