Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Read File Issue
#1
Hi,
So basically i'm trying to read something from a simple text file, and i don't really get any errors but the output is blank. Any help is appreciated :-)

employee_file = open("asa.txt", "r")

print(employee_file.read())

employee_file.close()
Output:
Process finished with exit code 0
Reply


Messages In This Thread
Simple Read File Issue - by blackjesus24 - Feb-08-2020, 07:19 PM
RE: Simple Read File Issue - by Axel_Erfurt - Feb-08-2020, 07:55 PM
RE: Simple Read File Issue - by blackjesus24 - Feb-08-2020, 11:42 PM
RE: Simple Read File Issue - by Axel_Erfurt - Feb-08-2020, 11:54 PM
RE: Simple Read File Issue - by blackjesus24 - Feb-09-2020, 12:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Read csv file through PyCharm kimx0961 3 157 Aug-01-2021, 07:05 PM
Last Post: perfringo
  Why it does not print(file.read()) Rejaul84 1 254 Jul-01-2021, 10:37 PM
Last Post: bowlofred
  Read and write active Excel file euras 4 379 Jun-29-2021, 11:16 PM
Last Post: Pedroski55
  [Solved] Trying to read specific lines from a file Laplace12 7 537 Jun-21-2021, 11:15 AM
Last Post: Laplace12
  [Solved] Using readlines to read data file and sum columns Laplace12 4 324 Jun-16-2021, 12:46 PM
Last Post: Laplace12
  Read file, reformat and write new file bryanmartin113 1 357 Jun-08-2021, 09:27 PM
Last Post: Larz60+
  Read/Write binary file deanhystad 3 747 Feb-01-2021, 10:29 AM
Last Post: Larz60+
  how to change the range of read CSV file every time python file runs greenpine 6 775 Dec-08-2020, 10:11 PM
Last Post: greenpine
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 862 Nov-30-2020, 03:24 PM
Last Post: gacg1
  How to read CSV file one row at the time in a range and some delay in between greenpine 2 1,092 Nov-20-2020, 02:26 PM
Last Post: greenpine

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020