[Tutor] help

james middendorff james2dope@yahoo.com
Wed, 3 Oct 2001 18:17:07 -0700 (PDT)


--0-2056993066-1002158227=:49067
Content-Type: text/plain; charset=us-ascii


hello,

I am making a sore attempt at a text reader, as my first major project while I am learning how to program, and I have a few questions,

my first question would be, I have actually pasted my code and my question below

read = raw_input("Type the full name and path of the file you want to open ")

 # I need to find an error message in case there is no file where you think this is question #1
inp = open(read, "r")
for line in inp.readlines():
    print line

my second question: is there anyway I can also write to these files?

and my last one: is there some kind of way to be able to use this to open a .doc file? or even to get a .rtf file to open the way its supposed to look?

thanks for the help


"I would kill everyone in this room
    for a drop of sweet beer."
     ----Homer Simpson----


---------------------------------
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. Yahoo! by Phone.
--0-2056993066-1002158227=:49067
Content-Type: text/html; charset=us-ascii

<P>hello,</P>
<P>I am making a sore attempt at a text reader, as my first major project while I am learning how to program, and I have a few questions,</P>
<P>my first question would be, I have actually pasted my code and my question below</P>
<P>read = raw_input("Type the full name and path of the file you want to open ")</P>
<P>&nbsp;# I need to find an error message in case there is no file where you think this is&nbsp;question #1<BR>inp = open(read, "r")<BR>for line in inp.readlines():<BR>&nbsp;&nbsp;&nbsp; print line</P>
<P>my second question: is there anyway I can also write to these files?</P>
<P>and my last one: is there some kind of way to be able to use this to open a .doc file? or even to get a .rtf file to open the way its supposed to look?</P>
<P>thanks for the help</P><BR><BR>"I would kill everyone in this room<br>    for a drop of sweet beer."<br>     ----Homer Simpson----<p><br><hr size=1><b>Do You Yahoo!?</b><br>
NEW from Yahoo! GeoCities - quick and easy <a
href="http://rd.yahoo.com/mail_us/tag/?http://geocities.yahoo.com/ps/info1" target="_blank">web site hosting</a>, just $8.95/month. Yahoo! by Phone</a>.
--0-2056993066-1002158227=:49067--