@Colstonewall It is because IDLE actually shows what is returned and a program does not. Basically if you make a function return a value it won't print it because return does nothing. and when you read a file with read() or readlines() it returns a string, but doesn't print it. IDLE I found is misleading and is not really the best thing to test working with files in. Now I just go to my terminal and type python and use the shell directly. To sum it up IDLE just isn't made that well.
LOL, I had the same problem with option #3, reading the file. Took me forever to figure it out. . .When I tried it in IDLE, it worked WITHOUT using print readline() or readlines(). Do you have any idea why Kurt?? In other words, in IDLE I could write, reading.readline(), and it worked fine. Not in the program though, lol.
@Colstonewall Hmm… I think I will try to more of these the problem is thought that I don't know what people would like to see. I will go do a bit of looking around and see if there are some nice projects and I can start from there.
Kurt, have you thought about maybe doing some more small projects like this in Python (or a little more complex) to help us beginners learn?? That's been my major problem, I know the basics, but was completely unsure how to get better. People told me, "do a project for something you need or want", but I had no idea what to do. Things like this would be great!
Just don't delete C:/ xD
doesn't work boo 🙁
impressed
Glad it helped!
@Colstonewall It is because IDLE actually shows what is returned and a program does not. Basically if you make a function return a value it won't print it because return does nothing. and when you read a file with read() or readlines() it returns a string, but doesn't print it. IDLE I found is misleading and is not really the best thing to test working with files in. Now I just go to my terminal and type python and use the shell directly. To sum it up IDLE just isn't made that well.
LOL, I had the same problem with option #3, reading the file. Took me forever to figure it out. . .When I tried it in IDLE, it worked WITHOUT using print readline() or readlines(). Do you have any idea why Kurt?? In other words, in IDLE I could write, reading.readline(), and it worked fine. Not in the program though, lol.
@Colstonewall Hmm… I think I will try to more of these the problem is thought that I don't know what people would like to see. I will go do a bit of looking around and see if there are some nice projects and I can start from there.
Kurt, have you thought about maybe doing some more small projects like this in Python (or a little more complex) to help us beginners learn?? That's been my major problem, I know the basics, but was completely unsure how to get better. People told me, "do a project for something you need or want", but I had no idea what to do. Things like this would be great!
Thanks Kurt. . .Awesome tut