query: How to check if code running is run directly via file or run via importing in some other file in python?
positive_passages.docid: 209
positive_passages.text: What does if __name__ == "__main__": do?
negative_passages.docid: 86265
negative_passages.text: Check for Process if Same is Running
negative_passages.docid: 20125
negative_passages.text: How do I syntax check a Bash script without running it?
negative_passages.docid: 45752
negative_passages.text: How do I get time of a Python program's execution?
negative_passages.docid: 37773
negative_passages.text: How do I detect whether a Python variable is a function?
negative_passages.docid: 73026
negative_passages.text: How to check the process is already running or not
negative_passages.docid: 45253
negative_passages.text: How to recognize whether a script is running on a tty?
negative_passages.docid: 17301
negative_passages.text: How can i find the python triggered by the GUI?
negative_passages.docid: 13985
negative_passages.text: How to determine which process is creating a file?
negative_passages.docid: 15046
negative_passages.text: How to check how long a process has been running?
negative_passages.docid: 73603
negative_passages.text: .Net: Running code when assembly is loaded
negative_passages.docid: 34456
negative_passages.text: How can a script check if it's being run as root?
negative_passages.docid: 53439
negative_passages.text: How do I know which file a program is trying to access?
negative_passages.docid: 61833
negative_passages.text: How can I check for Python version in a program that uses new language features?
negative_passages.docid: 25705
negative_passages.text: Test if a package (or package option) is loaded
negative_passages.docid: 35441
negative_passages.text: How to tell if a string contains valid Python code
negative_passages.docid: 89679
negative_passages.text: Run piece of code contained in a String