abhijangda
Padawan
hello frnds, i am facing a small problem in PYTHON. I wrote the following code in Python GUI.
def op(path):
with open(path,'r') as f:
f.read()
and if ran successfully without any error. I wrote the same code in notepad and then saved as ff.py file in Python folder. Then i wrote following command to run this module
from ff import *
then it shows the following error in code
Traceback (most recent call last):
File "<pyshell#55>", line 1, in <module>
from ff import *
File "C:\Python26\ff.py", line 3
f.read()
^
IndentationError: expected an indented block
I cant understand where's the error. Pls frnds help me.
def op(path):
with open(path,'r') as f:
f.read()
and if ran successfully without any error. I wrote the same code in notepad and then saved as ff.py file in Python folder. Then i wrote following command to run this module
from ff import *
then it shows the following error in code
Traceback (most recent call last):
File "<pyshell#55>", line 1, in <module>
from ff import *
File "C:\Python26\ff.py", line 3
f.read()
^
IndentationError: expected an indented block
I cant understand where's the error. Pls frnds help me.