Python File I/O Assignment headache

Discussion in 'Scripting & Programming' started by tripwire45, Mar 27, 2008.

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    180
    287
    I'll just attach the program I'm working on right now (the I/O program) because it's pretty long. I'm posting the specific area that I'm trying to figure out here:
    Code:
    '''After print >> out_file, there must be a string listed...not a dictionary. What do I put there?'''
    
    def save_grades():
        out_file = open(filename, "w")
        print >> out_file, '''what string goes here?'''
        out_file.close()
    I'm attaching it as a txt file since the CF forum software won't recognize the .py extension.
     

    Attached Files:

    Certifications: A+ and Network+
  2. Mathematix

    Mathematix Megabyte Poster

    969
    35
    74
    some ideas to investigate. your tutorial text should have provided some of these examples. :blink
     
    Certifications: BSc(Hons) Comp Sci, BCS Award of Merit
    WIP: Not doing certs. Computer geek.
  3. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    180
    287
    Thanks. Kewl looking Python tutorial. :)
     
    Certifications: A+ and Network+

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.