3c8c5e20edad1e50510731ac19fd7299f7992ec1,PyInstaller/compat.py,,,#,574
Before Change
return os.path.expandvars(os.path.expanduser(path))
// Site-packages functions - use native function if available.
if hasattr(site, "getsitepackages"):
getsitepackages = site.getsitepackages
// Backported for virtualenv.
// Module "site" in virtualenv might not have this attribute.
else:
def getsitepackages():
Return only one item as list with one item.
// For now used only on Windows. Raise Exception for other platforms.
if is_win:
pths = [os.path.join(sys.prefix, "Lib", "site-packages")]
// Include Real sys.prefix for virtualenv.
if is_virtualenv:
pths.append(os.path.join(base_prefix, "Lib", "site-packages"))
return pths
else:
// TODO Implement for Python 2.6 on other platforms.
raise NotImplementedError()
// Wrapper to load a module from a Python source file.
// This function loads import hooks when processing them.
import importlib.machinery
def importlib_load_source(name, pathname):
// Import module from a file.
mod_loader = importlib.machinery.SourceFileLoader(name, pathname)
After Change
// Backported for virtualenv.
// Module "site" in virtualenv might not have this attribute.
getsitepackages = getattr(site, "getsitepackages", getsitepackages)
// Wrapper to load a module from a Python source file.
// This function loads import hooks when processing them.
import importlib.machinery
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: pyinstaller/pyinstaller
Commit Name: 3c8c5e20edad1e50510731ac19fd7299f7992ec1
Time: 2020-05-14
Author: legorooj@protonmail.com
File Name: PyInstaller/compat.py
Class Name:
Method Name:
Project Name: brian-team/brian2
Commit Name: e18e9bd007d5785f2a6216e7252da07faf1b30da
Time: 2017-08-14
Author: charleetje@gmail.com
File Name: brian2/core/functions.py
Class Name: FunctionImplementationContainer
Method Name: __getitem__
Project Name: brian-team/brian2
Commit Name: cf15e66f27c9817ece51b048020dc9badd7daacc
Time: 2017-08-14
Author: charleetje@gmail.com
File Name: brian2/core/functions.py
Class Name: FunctionImplementationContainer
Method Name: __getitem__