Home
Python Tutorial
Introduction
Data Type
Statement
Operator
String
Tuple
List
Dictionary
Collections
Function
Class
File
Buildin Function
Buildin Module
Database
Regular Expressions
Thread
Tkinker
wxPython
XML
Network
CGI Web
Windows
Menu
exec « Buildin Function « Python Tutorial
Python Tutorial
Buildin Function
exec
13.16.exec
13.16.1.
exec function executes a string
13.16.2.
Executing Code Inside Strings
13.16.3.
Single Executable Statement
13.16.4.
Group of Executable Statements
13.16.5.
exec executes either a code object or a string representing Python code.
13.16.6.
exec can accept a valid file object to a (valid) Python file.