Name
execfile
Synopsis
voidinterp
.execfile(Stringname
) voidinterp
.execfile(java.io.InputStreams
) voidinterp
.execfile(java.io.InputStreams
,Stringname
)
Executes, in interp
’s
namespace, the Python statements read from the stream
s
or from the file named
name
. When you pass both
s
and name
,
execfile
reads the statements from
s
, and uses
name
as the filename in error messages.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.