b.py
import os
path = os.getcwd()
a.py
#
from base64 import b64encode, b64decode
data = open('./b.py').read().strip()
print(b64encode(data.encode('utf-8')))
data = b'aW1wb3J0IG9zCnBhdGggPSBvcy5nZXRjd2QoKQ=='
exec(b64decode(data))
print(path)
eval(source, globals=None, locals=None, /)
Evaluate the given source in the context of globals and locals.
The source may be a string representing a Python expression
or a code object as returned by compile().
exec(source, globals=None, locals=None, /)
Execute the given source in the context of globals and locals.
The source may be a string representing one or more Python statements
or a code object as returned by compile().