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

Function running_replit

PySimpleGUI/PySimpleGUI.py:325–337  ·  view source on GitHub ↗

A special case for REPLIT. Checks both the OS and for the existance of the number of environment variable REPL_OWNER Currently, Trinket only has ONE environment variable. This fact is used to figure out if Trinket is being used. Returns True if running on "replit" :return: True

()

Source from the content-addressed store, hash-verified

323
324
325def running_replit():
326 """
327 A special case for REPLIT. Checks both the OS and for the existance of the number of environment variable REPL_OWNER
328 Currently, Trinket only has ONE environment variable. This fact is used to figure out if Trinket is being used.
329
330 Returns True if running on "replit"
331
332 :return: True if sys.platform indicates Linux and setting REPL_OWNER is found in the environment variables
333 :rtype: (bool)
334 """
335 if 'REPL_OWNER' in os.environ and sys.platform.startswith('linux'):
336 return True
337 return False
338
339
340# Handy python statements to increment and decrement with wrapping that I don't want to forget

Callers 1

_compute_filenameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected