MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / __get_ver_38_later

Function __get_ver_38_later

PySimpleGUI/PySimpleGUI.py:24723–24743  ·  view source on GitHub ↗

Function that shows all versions of a package

(interpreter, package)

Source from the content-addressed store, hash-verified

24721 return out
24722
24723def __get_ver_38_later(interpreter, package):
24724 """
24725 Function that shows all versions of a package
24726 """
24727 pstr = __make_str(package)
24728
24729 with tempfile.NamedTemporaryFile(mode='w', delete=False) as file:
24730 file.write(pstr)
24731 file.seek(0)
24732 temp_file = file.name
24733
24734
24735 # temp_file = os.path.join(os.path.dirname(__file__), 'temp_py.py')
24736 # with open(temp_file, 'w') as file:
24737 # file.write(pstr)
24738 sp = execute_py_file(temp_file, interpreter_command=interpreter, pipe_output=True,merge_stderr_with_stdout=False, wait=False)
24739 out, err = execute_get_results(sp)
24740 if err:
24741 out = ''
24742 os.remove(temp_file)
24743 return out
24744
24745
24746def __make_str_pre_38(package):

Callers 1

__get_ver_threadFunction · 0.85

Calls 5

__make_strFunction · 0.85
execute_get_resultsFunction · 0.85
writeMethod · 0.80
removeMethod · 0.80
execute_py_fileFunction · 0.70

Tested by

no test coverage detected