shortsking Posted February 13, 2021 Share Posted February 13, 2021 i am making a text editor with python and i need to know how convert _io.TextIOWrapper to string. i am using filedialog from tkinter, and when i use askopenfile(initialdir = "/", title = 'Open', filetypes = (("Plain Text Files", "*.txt"),("All Files", "*.*"))), it gives me _io.TextIOWrapper. i need to derive the file path from this and convert to string as a variable, so i can just stick the variable in my open() function. does anyone have any experiance with this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now