{"id":7619,"date":"2019-11-06T02:11:44","date_gmt":"2019-11-06T02:11:44","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=7619"},"modified":"2022-07-24T10:16:44","modified_gmt":"2022-07-24T10:16:44","slug":"list-of-python3-options-and-arguments-command-lines","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/list-of-python3-options-and-arguments-command-lines\/","title":{"rendered":"Python Tutorials: List of python3 Options and arguments command lines"},"content":{"rendered":"\n<p>usage: \/Library\/Frameworks\/Python.framework\/Versions\/3.8\/bin\/python3 [option] \u2026 [-c cmd | -m mod | file | -] [arg] \u2026<\/p>\n\n\n\n<p><br> <strong>Options and arguments (and corresponding environment variables):<\/strong><\/p>\n\n\n\n<p><br> -b     : issue warnings about str(bytes_instance), str(bytearray_instance)<br>          and comparing bytes\/bytearray with str. (-bb: issue errors)<br> -B     : don&#8217;t write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x<br> -c cmd : program passed in as string (terminates option list)<br> -d     : debug output from parser; also PYTHONDEBUG=x<br> -E     : ignore PYTHON* environment variables (such as PYTHONPATH)<br> -h     : print this help message and exit (also &#8211;help)<br> -i     : inspect interactively after running script; forces a prompt even<br>          if stdin does not appear to be a terminal; also PYTHONINSPECT=x<br> -I     : isolate Python from the user&#8217;s environment (implies -E and -s)<br> -m mod : run library module as a script (terminates option list)<br> -O     : remove assert and <strong>debug<\/strong>-dependent statements; add .opt-1 before<br>          .pyc extension; also PYTHONOPTIMIZE=x<br> -OO    : do -O changes and also discard docstrings; add .opt-2 before<br>          .pyc extension<br> -q     : don&#8217;t print version and copyright messages on interactive startup<br> -s     : don&#8217;t add user site directory to sys.path; also PYTHONNOUSERSITE<br> -S     : don&#8217;t imply &#8216;import site&#8217; on initialization<br> -u     : force the stdout and stderr streams to be unbuffered;<br>          this option has no effect on stdin; also PYTHONUNBUFFERED=x<br> -v     : verbose (trace import statements); also PYTHONVERBOSE=x<br>          can be supplied multiple times to increase verbosity<br> -V     : print the Python version number and exit (also &#8211;version)<br>          when given twice, print more information about the build<br> -W arg : warning control; arg is action:message:category:module:lineno<br>          also PYTHONWARNINGS=arg<br> -x     : skip first line of source, allowing use of non-Unix forms of #!cmd<br> -X opt : set implementation-specific option<br> &#8211;check-hash-based-pycs always|default|never:<br>     control how Python invalidates hash-based .pyc files<br> file      : program read from script file <br>            : program read from stdin (default; interactive mode if a tty)<br>arg \u2026: arguments passed to program in sys.argv[1:]<br> <\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_66742\"><iframe loading=\"lazy\"  id=\"_ytid_37463\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_66742\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>usage: \/Library\/Frameworks\/Python.framework\/Versions\/3.8\/bin\/python3 [option] \u2026 [-c cmd | -m mod | file | -] [arg] \u2026 Options and arguments (and corresponding environment variables): -b : issue warnings about str(bytes_instance), str(bytearray_instance) and&#8230; <\/p>\n","protected":false},"author":1,"featured_media":7729,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[499],"tags":[],"class_list":["post-7619","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-programming-scripting-languages"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=7619"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7619\/revisions"}],"predecessor-version":[{"id":30737,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7619\/revisions\/30737"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/7729"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=7619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=7619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=7619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}