MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / running_trinket

Function running_trinket

PySimpleGUI/PySimpleGUI.py:310–322  ·  view source on GitHub ↗

A special case for Trinket. Checks both the OS and the number of environment variables Currently, Trinket only has ONE environment variable. This fact is used to figure out if Trinket is being used. Returns True if "Trinket" (in theory) :return: True if sys.platform indicates Li

()

Source from the content-addressed store, hash-verified

308
309
310def running_trinket():
311 """
312 A special case for Trinket. Checks both the OS and the number of environment variables
313 Currently, Trinket only has ONE environment variable. This fact is used to figure out if Trinket is being used.
314
315 Returns True if "Trinket" (in theory)
316
317 :return: True if sys.platform indicates Linux and the number of environment variables is 1
318 :rtype: (bool)
319 """
320 if sys.platform.startswith('linux') and socket.gethostname().startswith('pygame-'):
321 return True
322 return False
323
324
325def running_replit():

Callers 3

_compute_filenameMethod · 0.85
mainFunction · 0.85
PySimpleGUI.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected