+ 1

[SOLVED] when i use the with statement to open a file the print function does not work on command prompt

Spyder https://code.sololearn.com/cHlN23qeYsl2/?ref=app https://code.sololearn.com/cHlN23qeYsl2/?ref=app

5th Mar 2020, 9:54 PM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
13 ответов
+ 4
Peter Paulinus Polycarp put any python code in between """ your code """
6th Mar 2020, 1:07 AM
BroFar
BroFar - avatar
+ 3
why not show your code for us to better understand your problem
5th Mar 2020, 10:13 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 3
Here is more Peter Paulinus Polycarp as you may enjoy a good read https://docs.python.org/3/library/os.html
6th Mar 2020, 1:17 AM
BroFar
BroFar - avatar
+ 2
Hello Please add your code attempt when asking for help so the community can help you. Here are the 8 rules for getting help. https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community Thank you
5th Mar 2020, 10:44 PM
BroFar
BroFar - avatar
+ 2
BroFar it's on my system it works in code playground The problem is if i create a text file on notepad and try to read and print it either on idle, spyder, or command prompt it will print blank
5th Mar 2020, 10:51 PM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
+ 2
I'm wondering if you have the right GUI configuration Peter Paulinus Polycarp I'm almost certain if we were to actually see it in person, obviously not here based on your information, we might see a simple solution. Just tossing this out... PySimpleGUI.py https://pypi.org/project/PySimpleGUI/
5th Mar 2020, 11:11 PM
BroFar
BroFar - avatar
+ 2
@Brofar I tried creating text file in my ide and it worked, but it won't open an already made file
5th Mar 2020, 11:19 PM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
+ 2
BroFar I tried creating text file in my ide and it worked, but it won't open an already made file
5th Mar 2020, 11:19 PM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
5th Mar 2020, 11:39 PM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
+ 2
Any resource or link may help thanks
6th Mar 2020, 1:01 AM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
+ 2
Ok thanks,
6th Mar 2020, 1:12 AM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar
+ 1
BroFar I don't much about the OS mudule i'll have to learn it, i didn't get the code working bcs if that
6th Mar 2020, 1:00 AM
Peter Paulinus Polycarp
Peter Paulinus Polycarp - avatar