exec can accept a valid file object to a (valid) Python file. : Exec : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Exec »

 

exec can accept a valid file object to a (valid) Python file.


f = open('test.py')        # open the file
exec f                     # execute the file



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Exec