PHP
if (realpath($argv[0]) == __FILE__) { #Code some_code(); }
Ruby
if __FILE__ == $0 #Code some_code end
Python
if __name__ == '__main__': #Code some_code()
Recommended Posts