Text File not Opening (Python)

Text File not Opening (Python)
0.0 0


Evening Guys, working on the Reading & Writing Files on Python. Ran into a problem

this code -> open (’/Users/myHomeFolder/hello.txt’) is not opening the file in text edit.

Anyone with any idea, what that is ?



Hmm I think the open() function isn’t mean to open a text-editor instance on your machine but rather to create a file object and start reading from it or writing on it (or other operations in the filesystem).

Also, the open function takes a mode, which can be read only, write, write only etc… check out this page: http://www.tutorialspoint.com/python/python_files_io.htm


oh, thanks … Noticed it too when i tried it with hellfile.read() - it opened what was stored in hellfile.

Thanks a lot