Advertisement
Python253

is_281_available_languages

Mar 5th, 2024
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.90 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Filename: is_281_available_languages.py
  4. # Author: Jeoi Reqi
  5.  
  6. """
  7. This Python script checks the availability of 281 programming language interpreters, compilers, and markups on the system.
  8. It attempts to import each language module and prints whether the language is available or not.
  9.  
  10. Usage:
  11. 1. Ensure you have Python 3.x installed on your system.
  12. 2. Run the script in your terminal or command prompt.
  13. 3. The script will iterate through the list of languages, attempting to import each module.
  14. 4. It will print whether each language is available or not on your system.
  15.  
  16. Requirements:
  17. - Python 3.x
  18. """
  19.  
  20. languages = [
  21.     "4cs", "68000devpac", "acme", "actionscript", "actionscript3", "ada", "algol68", "apache", "applescript",
  22.     "apt_sources", "arduino", "arm", "arnoldc", "asm", "asp", "assembly", "asymptote", "autoconf", "autohotkey",
  23.     "autoit", "avisynth", "awk", "b3d", "bascomavr", "bash", "basic4gl", "befunge", "bf", "bibtex", "bmx", "bnf", "boo",
  24.     "brainfuck", "c", "caddcl", "cadlisp", "ceylon", "cfdg", "cfm", "chaiscript", "chapel", "chef", "cil",
  25.     "circuitpython", "clojure", "cmd", "cobol", "coffeescript", "cpp", "cpp_qt", "cpp_winapi", "csharp", "cuesheet",
  26.     "curses", "c_loadrunner", "c_mac", "c_winapi", "d", "dart", "dcl", "dcpu16", "dcs", "delphi", "diff", "div", "dot",
  27.     "duckyscript", "e", "ecmascript", "eiffel", "epc", "erlang", "esptool", "euphoria", "ezt", "f1", "falcon", "false",
  28.     "filemaker", "fo", "fortran", "freebasic", "freeswitch", "fsharp", "gambas", "gcc", "gdb", "gdscript", "genero",
  29.     "genie", "gettext", "glsl", "gml", "gnuplot", "go", "godot_glsl", "golfscript", "groovy", "gwbasic", "haskell",
  30.     "haxe", "hicest", "hq9plus", "html4strict", "html5", "icon", "idl", "ini", "inno_setup", "intercal", "io",
  31.     "ispf_panel", "j", "java", "java5", "jcl", "jquery", "json", "julia", "kickass", "kixtart", "klonec", "klonecpp",
  32.     "kotlin", "ksp", "latex", "lb", "ldif", "lisp", "llvm", "locobasic", "logtalk", "lolcode", "lotusformulas",
  33.     "lotusscript", "lscript", "lsl2", "lua", "m68k", "magiksf", "make", "malbolge", "mapbasic", "matlab", "mercury",
  34.     "metapost", "micropython", "mirc", "mk61", "mmix", "modula2", "modula3", "mpasm", "mxml", "mysql", "nagios", "nasm",
  35.     "netrexx", "newlisp", "nginx", "nim", "nodejs", "nsis", "oberon2", "objc", "objeck", "ocaml", "ocaml_brief", "octave",
  36.     "oobas", "ook", "oorexx", "oracle11", "oracle8", "oxygene", "oz", "parasail", "pari_gp", "pascal", "path", "pawn",
  37.     "pcre", "perl", "perl6", "pf", "phix", "php", "php_brief", "pic16", "piet", "pike", "pixelbender", "pli", "plsql",
  38.     "postgresql", "postscript", "povray", "powerbuilder", "powershell", "proftpd", "progress", "prolog", "properties",
  39.     "providex", "puppet", "purebasic", "pycon", "pys60", "python2", "python3", "q", "qbasic", "qml", "r", "racket",
  40.     "rails", "rbs", "rebol", "redcode", "reg", "rexx", "robots", "rockstar", "roff", "rpmspec", "rsplus", "ruby", "rust",
  41.     "sas", "scala", "scheme", "scilab", "scl", "sdlbasic", "shakespeare", "smalltalk", "smarty", "spark", "sparql", "sqf",
  42.     "sql", "sshconfig", "standardml", "stonescript", "swift", "systemverilog", "tcl", "teraterm", "texgraph", "thinbasic",
  43.     "tsql", "typescript", "typoscript", "unicon", "unlambda", "upc", "urbi", "uscript", "vala", "vb", "vbnet", "vbscript",
  44.     "vedit", "verilog", "vhdl", "vim", "visualfoxpro", "visualprolog", "vvvvvv", "white", "whitespace", "whois",
  45.     "winbatch", "xbasic", "xml", "xojo", "xorg_conf", "xpp", "yaml", "yara", "z80", "zxbasic"
  46. ]
  47.  
  48. for lang in languages:
  49.     try:
  50.         __import__(lang)
  51.         print(f"\n++[{lang}]++ is found & available on the system.\n")
  52.     except ImportError:
  53.         print(f"\t\t\t\t\tSorry... --[{lang}]-- is not currently available on the system.")
  54.     except Exception as e:
  55.         print(f"\n\t\tAn unexpected error occurred for ??[{lang}]??: {e}\n")
  56.  
  57.  
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement