# [SOLVED] Python : Read and Write a notepad file



## ajainakp (Mar 25, 2011)

Hai I am beginner in python programming

I want to read and write a notepad file using

a class and method in python.

Can anyone help me to do so ?

Any help will be appreciated.

I have pasted the notepad file content to be processed below
since I don't find any attachment option, please note down for 
the verification.

filename : FileToRW.txt

Content of Notepad File 
-------------------


RED; BLACK; GREEN; WHITE; PINK; ORANGE; 

R100; B100; G100; W100; P100; O100; 
R200; B200 G200 W200 P200 O200
R300; B300; G300; W300; P300; O300; 
R400; B400; G400; W400; P400; O400; 


"RUN 100"
"EXECUTE COLOR CODES"
"RESULT 1100"


----------



## Ninjaboi (Dec 27, 2010)

*Re: Python : Read and Write a notepad file*

7. Input and Output — Python v2.7.1 documentation
How to Read and Write Files in Python | eHow.com

The first link is Python documentation, and the second one is an eHow on reading and writing to files.


----------



## ajainakp (Mar 25, 2011)

*Re: Python : Read and Write a notepad file*

Thanks a lot your help!!!


----------

