<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Blikoor</title>
    <description>The latest articles on Forem by Blikoor (@blikoor).</description>
    <link>https://forem.com/blikoor</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F698820%2F44cac420-0f39-49e9-8abe-4bec651f4a9e.jpeg</url>
      <title>Forem: Blikoor</title>
      <link>https://forem.com/blikoor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/blikoor"/>
    <language>en</language>
    <item>
      <title>The print function</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Thu, 17 Mar 2022 16:15:43 +0000</pubDate>
      <link>https://forem.com/blikoor/the-print-function-2ia0</link>
      <guid>https://forem.com/blikoor/the-print-function-2ia0</guid>
      <description>&lt;p&gt;A &lt;em&gt;statement&lt;/em&gt; is an instruction that the Python interpreter can execute. A &lt;em&gt;function&lt;/em&gt; is a block of code that perform a specific action, and typically contain several statements. There are two types of Functions in Python: &lt;strong&gt;Built-in functions&lt;/strong&gt; — pre-defined functions like &lt;em&gt;print()&lt;/em&gt;, and &lt;strong&gt;User-defined functions&lt;/strong&gt; — functions created by programmers or developers.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.python.org/3/library/functions.html#print"&gt;print&lt;/a&gt; function was an addition to Python 3 and replaced the print statement of Python 2. (&lt;a href="https://www.python.org/dev/peps/pep-3105/"&gt;PEP 3105&lt;/a&gt;). We can print values to the screen (&lt;em&gt;stdout&lt;/em&gt;) by default or an open file. It is, for example, commonly used in debugging. The function can accept any number of &lt;em&gt;positional arguments&lt;/em&gt; and defines four optional &lt;em&gt;keyword arguments&lt;/em&gt; that already have default values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;object(s)&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Objects, will be converted to string before printed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;sep='separator'&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Optional — specify how to separate the objects, if there is more than one. The default is ' '.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;end='end'&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Optional — specify what to print at the end. The default is '\n' character (newline).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;file&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Optional — an object with a write method. The default is sys.stdout.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;flush&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Optional — a Boolean, specifying if the output is flushed (True) or the default buffered (False).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Escape sequences
&lt;/h3&gt;

&lt;p&gt;First, let's briefly discuss these special characters since they often appear in string literals with a preceding backslash &lt;code&gt;\&lt;/code&gt;. They allow the representation of invisible control characters and sometimes the escaping of otherwise illegal characters.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;single quote&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;double quote&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\\&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;backslash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;\n&lt;/code&gt;, &lt;code&gt;\r&lt;/code&gt;, &lt;code&gt;\r\n&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;newline or line feed (LF)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\r&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;carriage return (CR)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;tab&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;\b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;backspace&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note that a newline can be a single control character or a sequence of control characters depending on the operating system (OS).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows &amp;amp; Dos represent an EOL as &lt;code&gt;\r\n&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Unix, Linux and macOS represent an EOL as &lt;code&gt;\n&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Mac OS X represent an EOL as &lt;code&gt;\r&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Printing to terminal
&lt;/h2&gt;

&lt;p&gt;1. You can print a blank line (&lt;code&gt;\n&lt;/code&gt;), passing no arguments with empty parentheses.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. You can print literals. A &lt;em&gt;literal&lt;/em&gt; is a notation for representing a value in source code. There are various value types (int, float, tuple, string, etc.).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;3.14159&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;58&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;168&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Press &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Enter&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt; to continue."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/EPDM2E"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. You can print variables. A &lt;em&gt;variable&lt;/em&gt; is a symbolic name that references or points to the computer memory location used to store a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14159&lt;/span&gt;
&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Press 'Enter' to continue."&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/ORKLTQ"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. You can print expressions directly. An &lt;em&gt;expression&lt;/em&gt; is combination of operators and operands that is interpreted to produce some other value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Python was first released "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;" years aggo."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/8FLSKW"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. You can print multiple literals, separating them with a comma (&lt;code&gt;,&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;series&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Monty Python's Flying Circus"&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Python was named after the BBC comedy series:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;series&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/LRIAIO"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6. You can print values with another separator (see &lt;code&gt;sep&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Hello'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'World!'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"C"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Guido"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Documents"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"phone number"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"address"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;","&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/764QBO"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7. You can print literals without line breaks or trailing newline character (see &lt;code&gt;end&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Proceed with Format (Y/N)? "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Y"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/14UMMK"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  String formatting
&lt;/h2&gt;

&lt;p&gt;Since Python 3.6, you can format string literals with &lt;a href="https://docs.python.org/3/reference/lexical_analysis.html#f-strings"&gt;f-strings&lt;/a&gt; (&lt;a href="https://www.python.org/dev/peps/pep-0498/"&gt;PEP 498&lt;/a&gt;). Although this is now the recommended way to format string literals, it is not intended completely replace the &lt;a href="https://docs.python.org/3/library/stdtypes.html#str.format"&gt;str.format()&lt;/a&gt; and &lt;a href="https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting"&gt;printf-style formatting&lt;/a&gt; mechanisms.&lt;/p&gt;

&lt;p&gt;A formatted string literal or &lt;em&gt;f-string&lt;/em&gt; is a string literal that is prefixed with &lt;code&gt;f&lt;/code&gt; or &lt;code&gt;F&lt;/code&gt;. These strings may contain &lt;a href="https://docs.python.org/3/library/string.html#formatspec"&gt;replacement fields&lt;/a&gt;, which are expressions delimited by curly braces (&lt;code&gt;{}&lt;/code&gt;). The &lt;a href="https://docs.python.org/3/library/string.html#formatspec"&gt;format specification mini-language&lt;/a&gt; is the same as that used by the &lt;em&gt;str.format()&lt;/em&gt; method.&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;"{" [field_name] ["!" conversion] [":" format_spec] "}"&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arguments&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;field_name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specifies the object whose value is to be formatted and inserted.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;conversion&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional — type coercion, to force a type conversion (prefixed with &lt;code&gt;!&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;format_spec&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional — specification of how the value should be presented (prefixed with &lt;code&gt;:&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  field_name
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;arg_name ("." attribute_name | "[" element_index "]")*&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arguments&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;arg_name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;[identifier  digit+]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;attribute_name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;identifier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;element_index&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;digit+  index_string&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  conversion
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;"r" | "s" | "a"&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arguments&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;r&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Calls &lt;a href="https://docs.python.org/3/library/functions.html#repr"&gt;repr()&lt;/a&gt; on the argument before &lt;code&gt;format_spec&lt;/code&gt; implement &lt;a href="https://docs.python.org/3/reference/datamodel.html?highlight=__format__#object.__format__"&gt;__format()__&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Calls &lt;a href="https://docs.python.org/3/library/stdtypes.html#str"&gt;str()&lt;/a&gt; on the argument before &lt;code&gt;format_spec&lt;/code&gt; implement &lt;a href="https://docs.python.org/3/reference/datamodel.html?highlight=__format__#object.__format__"&gt;__format()__&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Calls &lt;a href="https://docs.python.org/3/library/functions.html#ascii"&gt;ascii()&lt;/a&gt; on the argument before &lt;code&gt;format_spec&lt;/code&gt; implement &lt;a href="https://docs.python.org/3/reference/datamodel.html?highlight=__format__#object.__format__"&gt;__format()__&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  format_spec
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;[[fill]align] [sign] [#] [0] [width] [grouping_option] [.precision] [type]&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arguments&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fill&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;any character&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;align&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;&amp;lt;&lt;/code&gt;  &lt;code&gt;&amp;gt;&lt;/code&gt;  &lt;code&gt;=&lt;/code&gt;  &lt;code&gt;^&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sign&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;+&lt;/code&gt;  &lt;code&gt;-&lt;/code&gt;  &lt;code&gt;" "&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;width&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;digit+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;grouping_option&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;_&lt;/code&gt;  &lt;code&gt;,&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;precision&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;digit+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;b&lt;/code&gt;  &lt;code&gt;c&lt;/code&gt;  &lt;code&gt;d&lt;/code&gt;  &lt;code&gt;e&lt;/code&gt;  &lt;code&gt;E&lt;/code&gt;  &lt;code&gt;f&lt;/code&gt;  &lt;code&gt;F&lt;/code&gt;  &lt;code&gt;g&lt;/code&gt;  &lt;code&gt;G&lt;/code&gt;  &lt;code&gt;n&lt;/code&gt;  &lt;code&gt;o&lt;/code&gt;  &lt;code&gt;s&lt;/code&gt;  &lt;code&gt;x&lt;/code&gt;  &lt;code&gt;X&lt;/code&gt;  &lt;code&gt;%&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;8. You can print expressions in f-strings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;43&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;47&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/8CHFWG"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9. You can print variables in f-strings (see &lt;code&gt;field name&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;nation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Mayan"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;logo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;175&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;222&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;77&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"The Python logo depicts &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; colored snakes based on ancient &lt;/span&gt;&lt;span class="se"&gt;\
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;nation&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; drawings."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/89LC4O"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;10. You can call methods in f-strings (see &lt;code&gt;field name&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Monty Python"&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Eric Idle is an actor of the comedy group &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/4295I9"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;11. You can call functions in f-strings (see &lt;code&gt;field name&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;to_upper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Monty Python"&lt;/span&gt;  
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Eric Idle is an actor of the comedy group &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;to_upper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/WQ9ZKC"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;12. You can print objects in f-strings (see &lt;code&gt;field name&lt;/code&gt;). By default, it will print whatever the &lt;em&gt;__str__&lt;/em&gt; method returns, or you can use explicit conversion flags (see &lt;code&gt;conversion&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__str__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"This is a RGB color object."&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__repr__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Color(&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)"&lt;/span&gt;

&lt;span class="n"&gt;flat_blue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;175&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;light_gold&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;222&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;77&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;flat_blue&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;flat_blue&lt;/span&gt;&lt;span class="err"&gt;!&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;light_gold&lt;/span&gt;&lt;span class="err"&gt;!&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/K6LBN8"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;13. You can format the alignment and padding of values in f-strings (see &lt;code&gt;align&lt;/code&gt; and &lt;code&gt;fill&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;prime_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;997&lt;/span&gt;
&lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Python"&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prime_number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;97&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prime_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-^&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/KZW7H2"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;14. You can format the sign, grouping and rounding of numbers in f-strings (see &lt;code&gt;sign&lt;/code&gt;, &lt;code&gt;grouping_option&lt;/code&gt;, and &lt;code&gt;precision&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9576890767&lt;/span&gt;
&lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;25169.15683&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:,&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"$ &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:,.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"R &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:,.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;','&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;' '&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/3YS97I"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;15. You can format values as different types in f-strings (see &lt;code&gt;type&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;decimal_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;
&lt;span class="n"&gt;binary_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mb"&gt;0b11101&lt;/span&gt;
&lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.2827&lt;/span&gt;
&lt;span class="n"&gt;big_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;176846309399143769411680&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decimal_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decimal_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decimal_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;decimal_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;binary_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;big_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Python has a PYPL-index of &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;:.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="http://tpcg.io/F8485G"&gt;[run code]&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Printing to a file
&lt;/h2&gt;

&lt;p&gt;The print function doesn't just send text to the screen but more accurately converts objects to strings and writes them to a stream (file-like object). A stream can be any file on your drive, a network socket, or a location in memory (buffer). In addition to this, the operating system provides three standard streams:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stream&lt;/th&gt;
&lt;th&gt;File Handle&lt;/th&gt;
&lt;th&gt;Desciption&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;stdin (standard input)&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;keyboard input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stdout (standard output)&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;screen output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stderr (standard error)&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;screen output&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As mentioned earlier, the print function use stdout by default. However, using a redirection operator (&lt;code&gt;&amp;gt;&lt;/code&gt;), we can instruct the operating system to use a file stream instead. The &lt;em&gt;redirection operator&lt;/em&gt; can either redirect input to a shell command or output from a shell command. To redirect &lt;em&gt;stderr&lt;/em&gt;, you need to use a &lt;em&gt;file handle&lt;/em&gt;. File handles are constant numbers associated with the standard streams. These handles allow you to redirect one or more streams at a time.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Syntax&lt;/th&gt;
&lt;th&gt;Descrption&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program &amp;gt; file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Redirect &lt;em&gt;stdout&lt;/em&gt; to a file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program 2&amp;gt; file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Redirect &lt;em&gt;stderr&lt;/em&gt; to a file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program &amp;gt; file 2&amp;gt; file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Redirect &lt;em&gt;stdout&lt;/em&gt; and &lt;em&gt;stderr&lt;/em&gt; to separate files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program &amp;gt;&amp;gt; file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Append &lt;em&gt;stdout&lt;/em&gt; to a file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;program &amp;lt; file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Type a text file and pass the text to program.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For example, you might execute &lt;code&gt;systeminfo.exe&lt;/code&gt; to save the information provided by the systeminfo command to a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;systeminfo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;system_info.txt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;16. You can use stream redirection for various command-line programs including your own Python scripts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# message.py
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to stdout"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;message.py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;message.txt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;17. You can use stream redirection in Python. This is done by first obtaining a reference to the standard output using the &lt;em&gt;stdout&lt;/em&gt; &lt;a href="https://docs.python.org/3/glossary.html#term-file-object"&gt;file object&lt;/a&gt; of the &lt;a href="https://docs.python.org/3/library/sys.html?highlight=sys%20module#module-sys"&gt;sys&lt;/a&gt; module. Its a good practice to store the original value of the standard output in a variable before changing it. This way you can reset it back to its original value afterwards. The &lt;a href="https://docs.python.org/3/reference/compound_stmts.html#with"&gt;with&lt;/a&gt; statement creates a runtime context that allows you to run a group of statements under the control of a &lt;a href="https://docs.python.org/3/reference/datamodel.html#context-managers"&gt;context manager&lt;/a&gt;. The &lt;a href="https://docs.python.org/3/library/functions.html#open"&gt;open&lt;/a&gt; function tries to open a file in writing mode and if successful returns a &lt;em&gt;file object&lt;/em&gt; also called a handle. The following modes are commonly used with the print function:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;'r'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open for reading (default).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;'w'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open for writing, truncating the file first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;'x'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open for exclusive creation, fails if the file already exists.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;'a'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open for writing, appending to the end of file if it exists.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;'+'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open for updating (reading and writing).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;


&lt;span class="n"&gt;default_stdout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt; &lt;span class="c1"&gt;# save the original value of stdout
&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to stdout."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'message.txt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'w'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;file_object&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file_object&lt;/span&gt; &lt;span class="c1"&gt;# redirect stdout to the file
&lt;/span&gt;    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to file."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;default_stdout&lt;/span&gt; &lt;span class="c1"&gt;# reset stdout to its original value
&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to stdout."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18. You can print to a file directly without using stream redirection (see &lt;code&gt;file&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;


&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to stdout."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'message.txt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'w'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;file_object&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This message will be written to file."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;file_object&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;19. You can disable buffering of the standard output. The operating system buffers expensive I/O operations to enhance performance, but sometimes buffering can have undesired effects. There are three kinds of streams concerning buffering — unbuffered, line-buffered, and block-buffered. A &lt;em&gt;line-buffered&lt;/em&gt; stream waits until there is a EOL in the buffer, whereas a &lt;em&gt;block-buffered&lt;/em&gt; stream waits for the buffer to fill up. The standard output is both line-buffered and block-buffered, depending on which event comes first. (see &lt;code&gt;flush&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sleep&lt;/span&gt;


&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;reversed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flush&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Launch!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;20. To round off our look at the print function, here is a real-world example of a text-based progress bar that can be used for command line programs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sleep&lt;/span&gt;


&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;fill&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
    &lt;span class="n"&gt;track&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;fill&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;:.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\r&lt;/span&gt;&lt;span class="s"&gt;["&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"#"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;" "&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;track&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flush&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WT3Ucpt0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iost6mqldf1sora89wa8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WT3Ucpt0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iost6mqldf1sora89wa8.gif" alt="Image description" width="501" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning Python</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Wed, 16 Feb 2022 13:36:34 +0000</pubDate>
      <link>https://forem.com/blikoor/learning-python-5c3j</link>
      <guid>https://forem.com/blikoor/learning-python-5c3j</guid>
      <description>&lt;p&gt;Python is a beginner-friendly programming language that prioritizes readability, this is why its syntax has many similarities with the English language. In fact, ease of use was one of Python’s founding principles when it was created by Guido van Rossum.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code. Not in reams of trivial code that bores the reader to death. — Guido van Rossum&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can start learning Python on your own for free. The best thing about learning Python, is that there is a plethora of documentation, websites, books, tutorials, and courses available. Start by following these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find out more about Python.&lt;/li&gt;
&lt;li&gt;Learn the basics.&lt;/li&gt;
&lt;li&gt;Practice as you learn.&lt;/li&gt;
&lt;li&gt;Solve coding challenges.&lt;/li&gt;
&lt;li&gt;Learn domain-specific concepts and libraries.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Software
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pythontutor.com/"&gt;Python Tutor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.jdoodle.com/python3-programming-online/"&gt;jDOODLE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.online-python.com/"&gt;ONLINE PYTHON&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://trinket.io/"&gt;trinket&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://replit.com/"&gt;rplit&amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Documentation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The latest &lt;a href="https://docs.python.org/3/"&gt;Python 3.x documentation&lt;/a&gt; online.&lt;/li&gt;
&lt;li&gt;Download the latest &lt;a href="https://docs.python.org/3/download.html"&gt;Python 3.x documentation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://wiki.python.org/moin/BeginnersGuide"&gt;Beginner's Guide to Python&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Python community list of &lt;a href="https://wiki.python.org/moin/PythonEditors"&gt;Python editors&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Python community list of &lt;a href="https://wiki.python.org/moin/IntegratedDevelopmentEnvironments"&gt;Integrated Development Environments (IDEs)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The Hitchhiker's &lt;a href="https://docs.python-guide.org/"&gt;Guide to Python&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A curated list of &lt;a href="https://github.com/vinta/awesome-python"&gt;Awesome Python&lt;/a&gt; frameworks, libraries, software and resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  PEPs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0008/"&gt;PEP 8&lt;/a&gt; ]  Style Guide for Python Code&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0020/"&gt;PEP 20&lt;/a&gt; ] The Zen of Python&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0257/"&gt;PEP 257&lt;/a&gt; ] Docstring Conventions&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0287/"&gt;PEP 287&lt;/a&gt; ] reStructuredText Docstring Format&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0405/"&gt;PEP 405&lt;/a&gt; ] Python Virtual Environments&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0435/"&gt;PEP 435&lt;/a&gt; ] Adding an Enum type to the Python standard library&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0484/"&gt;PEP 484&lt;/a&gt; ] Type Hints&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0526/"&gt;PEP 526&lt;/a&gt; ] Syntax for variable Annotations&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-0634/"&gt;PEP 634&lt;/a&gt; ] Structural Pattern Matching&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-3101/"&gt;PEP 3101&lt;/a&gt; ] Advanced String Formatting&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-3107/"&gt;PEP 3107&lt;/a&gt; ] Function Annotations&lt;/li&gt;
&lt;li&gt;[ &lt;a href="https://www.python.org/dev/peps/pep-3129/"&gt;PEP 3129&lt;/a&gt; ] Class Decorators&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Books
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CR Severance - &lt;a href="https://www.py4e.com/book"&gt;Python for Everybody&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kushal Das. - &lt;a href="https://pymbook.readthedocs.io/en/latest/"&gt;Python for you and me&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CH Swaroop - &lt;a href="https://python.swaroopch.com/"&gt;A Byte of Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Allen B Downey - &lt;a href="https://greenteapress.com/wp/think-python-2e/"&gt;Think Python 2e&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Al Sweigart - &lt;a href="https://automatetheboringstuff.com/"&gt;Automate the Boring Stuff with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Al Sweigart - &lt;a href="https://inventwithpython.com/beyond/"&gt;Beyond the Basic Stuff with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Al Sweigart - &lt;a href="http://inventwithpython.com/cracking/"&gt;Cracking Codes with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Mark Pilgrim - &lt;a href="http://diveintopython3.problemsolving.io/"&gt;Dive Into Python 3&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Apprize.best - &lt;a href="https://apprize.best/python/easy_1/index.html"&gt;Python Programming Made Easy (2016)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Rafe Kettler - &lt;a href="https://github.com/RafeKettler/magicmethods/blob/master/magicmethods.pdf"&gt;A Guide to Python’s Magic Methods&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tutorials
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Programiz - &lt;a href="https://www.programiz.com/python-programming"&gt;Learn Python Programmning&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Python.org - &lt;a href="https://docs.python.org/3/tutorial/"&gt;The Python Tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Real Python - &lt;a href="https://realpython.com/"&gt;Real Python Tutorials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google - &lt;a href="https://developers.google.com/edu/python"&gt;Google's Python Class&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;KidsCanCode - &lt;a href="https://www.youtube.com/playlist?list=PLsk-HSGFjnaGe7sS_4VpZoEtZF2VoWtoR"&gt;Learning to Code with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Pythonbasics.org - &lt;a href="https://pythonbasics.org/"&gt;Learn Python Programming&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ThePythonGuru - &lt;a href="https://thepythonguru.com/"&gt;Python tutorials for Beginners&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;TechBeamers - &lt;a href="https://www.techbeamers.com/python-tutorial-step-by-step/"&gt;Learn Python Step by Step&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;pythoncheatsheet.org - &lt;a href="https://www.pythoncheatsheet.org/"&gt;Python Cheatsheet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Pythonspot - &lt;a href="https://pythonspot.com/"&gt;Python Tutorials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Python Tutorial - &lt;a href="https://www.pythontutorial.net/"&gt;Python Tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CodersLegacy - &lt;a href="https://coderslegacy.com/python/"&gt;Learn Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Study tonight - &lt;a href="https://www.studytonight.com/python/"&gt;Python Tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Full Stack Python - &lt;a href="https://www.fullstackpython.com/"&gt;Build , Deploy and Operate Python Applications&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Interactive Tutorials &amp;amp; Books
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;learnpython.org - &lt;a href="https://www.learnpython.org/"&gt;Intro to Python tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;W3schools - &lt;a href="https://www.w3schools.com/python/"&gt;Python Tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;codetheblocks.com - &lt;a href="https://codetheblocks.com/tutorials/introduction"&gt;Code the Blocks (CTB)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Luther College - &lt;a href="https://runestone.academy/ns/books/published/pythonds/index.html"&gt;Problem Solving with Algorithms and Data Structures using Python&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tutorial Videos
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CS Dojo - &lt;a href="https://www.youtube.com/playlist?list=PLBZBJbE_rGRWeh5mIBhD-hhDwSEDxogDg"&gt;Python Tutorials for Absolute Beginners&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Traversy Media - &lt;a href="https://www.youtube.com/watch?v=JJmcL1N2KQs"&gt;Python Crash Course For Beginners&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Al Sweigart - &lt;a href="https://www.youtube.com/playlist?list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW"&gt;Automate the Boring Stuff with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;freecodecamp - &lt;a href="https://www.youtube.com/playlist?list=PLWKjhJtqVAbkmRvnFmOd4KhDdlK1oIq23"&gt;Python Basics with Sam&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sentdex - &lt;a href="https://www.youtube.com/playlist?list=PLQVvvaa0QuDfju7ADVp5W1GF9jVhjbX-_"&gt;Intermediate Python Programming&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Next Day Video - &lt;a href="https://www.youtube.com/watch?v=OSGv2VnC0go"&gt;Transforming Code into Beautiful, Idiomatic Python&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Courses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CR Severance - &lt;a href="https://www.py4e.com/"&gt;Programming for Everybody (py4e)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;freecodecamp - &lt;a href="https://www.freecodecamp.org/news/python-for-everybody/"&gt;Python for Everybody&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;sololearn - &lt;a href="https://www.sololearn.com/learning/1073"&gt;Python Core&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Practise Exercises &amp;amp; Coding Challenges
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;github.com/gregmalcolm - &lt;a href="https://github.com/gregmalcolm/python_koans"&gt;Python Koans&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;checkio - &lt;a href="https://checkio.org/"&gt;Coding games beginners to advanced&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;finxter - &lt;a href="https://finxter.com/"&gt;Puzzle Training&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Practice Python - &lt;a href="https://www.practicepython.org/"&gt;Beginner Python exercises&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;w3resource - &lt;a href="https://www.w3resource.com/python-exercises/"&gt;Python Exercises, Practice, Solutions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GeeksforGeeks - &lt;a href="https://www.geeksforgeeks.org/python-exercises-practice-questions-and-solutions/"&gt;Python Practice Exercises&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Podcasts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pythonpodcast.com/"&gt;Podcast.__init__&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pythonbytes.fm/episodes/all"&gt;PythonBytes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://runninginproduction.com/"&gt;Running in Production&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://talkpython.fm/episodes/all"&gt;Talk Python To Me&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://testandcode.com/episodes"&gt;Test &amp;amp; Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://realpython.com/podcasts/rpp/"&gt;The Real Python Podcast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is Python?</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Wed, 16 Feb 2022 13:36:13 +0000</pubDate>
      <link>https://forem.com/blikoor/what-is-python-mpe</link>
      <guid>https://forem.com/blikoor/what-is-python-mpe</guid>
      <description>&lt;p&gt;In a nutshell — Python is an interpreted,  interactive, object-oriented, general-purpose programming language.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design philosophy &amp;amp; Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The Python language's core philosophy is summarized in &lt;a href="https://www.python.org/dev/peps/pep-0020/"&gt;PEP 20&lt;/a&gt;, titled &lt;em&gt;"The Zen of Python"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Python is a multi-paradigm programming language where &lt;em&gt;Object-oriented programming&lt;/em&gt;, &lt;em&gt;procedural programming&lt;/em&gt; and &lt;em&gt;functional programming&lt;/em&gt; are fully supported. Many of Python's features support &lt;em&gt;aspect-oriented programming&lt;/em&gt;, including &lt;em&gt;metaprogramming&lt;/em&gt; and &lt;em&gt;metaobjects&lt;/em&gt; (also called &lt;em&gt;magic methods&lt;/em&gt;). Many other paradigms like &lt;em&gt;design by contract&lt;/em&gt; and &lt;em&gt;logic programming&lt;/em&gt; are also supported via extensions.&lt;/li&gt;
&lt;li&gt;Python's extensive &lt;a href="https://docs.python.org/3/library/"&gt;standard library&lt;/a&gt; is commonly cited as one of its greatest strengths and provides tools suited to many tasks. Rather than having all of this functionality built into its core, Python was designed to be highly extensible with &lt;a href="https://docs.python.org/3/glossary.html#term-package"&gt;modules&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Python features &lt;em&gt;dynamic name resolution&lt;/em&gt; during runtime.&lt;/li&gt;
&lt;li&gt;Python is a &lt;em&gt;strongly-typed&lt;/em&gt; language, meaning you can't perform operations inappropriate to the &lt;a href="https://docs.python.org/3/glossary.html#term-type"&gt;type&lt;/a&gt; of the &lt;a href="https://docs.python.org/3/glossary.html#term-object"&gt;object&lt;/a&gt; (e.g. adding numbers to strings). Python is also a &lt;em&gt;dynamically-typed&lt;/em&gt; language, meaning a variable is simply a value bound to a name with no associated data type.&lt;/li&gt;
&lt;li&gt;Python uses &lt;em&gt;duck typing&lt;/em&gt;, a concept related to dynamic typing — Python don't check types, it checks for the presence of a given method or attribute.&lt;/li&gt;
&lt;li&gt;Since Python 3.5, type &lt;a href="https://docs.python.org/3/glossary.html#term-annotation"&gt;annotations&lt;/a&gt; can be used for possible static analysis, refactoring, runtime type checking and code generation. An optional static type checker named &lt;a href="https://github.com/python/mypy"&gt;mypy&lt;/a&gt; supports compile-time type checking.&lt;/li&gt;
&lt;li&gt;Python allows you to &lt;em&gt;assign&lt;/em&gt; a value to a variable without first &lt;em&gt;declaring&lt;/em&gt; it, but it will not let you &lt;em&gt;reference&lt;/em&gt; a variable that has never been assigned a value.&lt;/li&gt;
&lt;li&gt;Python doesn't support &lt;em&gt;tail call&lt;/em&gt; optimization and &lt;em&gt;first-class continuations&lt;/em&gt;. However, Python has better support for coroutine-like functionality by extending Python's &lt;a href="https://docs.python.org/3/glossary.html#term-generator"&gt;generator&lt;/a&gt; functions.&lt;/li&gt;
&lt;li&gt;Python developers should strive to avoid &lt;em&gt;premature optimization&lt;/em&gt; since it can reduce readability and add code that only exists to improve performance. This may complicate programs, making them harder to maintain and debug. When speed is important, you can move time-critical functions to extension modules written in languages such as C/C++. You can also use &lt;a href="https://www.pypy.org/"&gt;PyPy&lt;/a&gt; or &lt;a href="https://cython.org/"&gt;Cython&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%. — Donald Knuth&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Statements &amp;amp; Control flow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python uses a &lt;em&gt;carriage return&lt;/em&gt; to separate statements.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Code blocks&lt;/em&gt; are defined by their indentation. Python use &lt;em&gt;whitespace indentation&lt;/em&gt;, there are no explicit &lt;em&gt;braces&lt;/em&gt;, &lt;em&gt;brackets&lt;/em&gt;, or &lt;em&gt;keywords&lt;/em&gt;. This means that &lt;em&gt;whitespace&lt;/em&gt; is significant, and must be consistent. Four spaces are the preferred indentation method, avoid using tabs.&lt;/li&gt;
&lt;li&gt;Python uses &lt;code&gt;if&lt;/code&gt; along with &lt;code&gt;else&lt;/code&gt; and &lt;code&gt;elif&lt;/code&gt; (a contraction of else-if) statements for &lt;em&gt;conditional execution&lt;/em&gt; of a code block.&lt;/li&gt;
&lt;li&gt;Since Python 3.10, the &lt;code&gt;match&lt;/code&gt; and &lt;code&gt;case&lt;/code&gt; statements can be used for pattern matching. The &lt;code&gt;match&lt;/code&gt; statement is similar to the &lt;em&gt;switch statement&lt;/em&gt; of other languages.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;for&lt;/code&gt; statement to &lt;em&gt;iterate&lt;/em&gt; over an &lt;em&gt;iterable object&lt;/em&gt; and the &lt;code&gt;while&lt;/code&gt; statement to execute a code block as long as its &lt;em&gt;condition&lt;/em&gt; is true.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;break&lt;/code&gt; statement to exit the loop containing it, after which the program flow continues immediately after the loop body.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;continue&lt;/code&gt; statement, skips this iteration and continues with the next statement.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://docs.python.org/3/glossary.html#term-function"&gt;function&lt;/a&gt; or &lt;a href="https://docs.python.org/3/glossary.html#term-method"&gt;method&lt;/a&gt; can be defined with the &lt;code&gt;def&lt;/code&gt; statement.&lt;/li&gt;
&lt;li&gt;Python defines a &lt;a href="https://docs.python.org/3/glossary.html#term-class"&gt;class&lt;/a&gt; with the &lt;code&gt;class&lt;/code&gt; statement.&lt;/li&gt;
&lt;li&gt; A &lt;em&gt;colon&lt;/em&gt; &lt;code&gt;:&lt;/code&gt; is used to start a code block in the case of &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;elif&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;def&lt;/code&gt;, and &lt;code&gt;class&lt;/code&gt; statements. It is also used to fetch data and &lt;em&gt;index ranges&lt;/em&gt;, &lt;em&gt;slicing&lt;/em&gt;, and to identify &lt;em&gt;keys&lt;/em&gt; in &lt;em&gt;dictionaries&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;All names in Python are &lt;em&gt;case-sensitive&lt;/em&gt;: i.e. names of &lt;em&gt;variables&lt;/em&gt;, &lt;em&gt;functions&lt;/em&gt;, &lt;em&gt;classes&lt;/em&gt;, &lt;em&gt;modules&lt;/em&gt;, and &lt;em&gt;exceptions&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;del&lt;/code&gt; statement is used to delete variables and objects from existence.&lt;/li&gt;
&lt;li&gt;In Python, the &lt;code&gt;pass&lt;/code&gt; statement serves as a &lt;em&gt;NULL statement&lt;/em&gt;. The interpreter parses it to a &lt;em&gt;NOP instruction&lt;/em&gt;, meaning no operation in machine language. It is syntactically needed to create an empty code block.&lt;/li&gt;
&lt;li&gt;Python uses &lt;code&gt;try&lt;/code&gt;... &lt;code&gt;except&lt;/code&gt; code blocks to handle &lt;em&gt;exceptions&lt;/em&gt;, and &lt;code&gt;raise&lt;/code&gt; statements to generate them.&lt;/li&gt;
&lt;li&gt;In Python, the &lt;code&gt;assert&lt;/code&gt; statement can be used during debugging to check conditions that should always be true. If the condition is not satisfied, the program stop and gives an &lt;code&gt;AssertionError&lt;/code&gt; along with an optional message.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;return&lt;/code&gt; statement is used to return a value from functions.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;yield&lt;/code&gt; statement returns a value from generator functions.&lt;/li&gt;
&lt;li&gt;Python uses these &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;+=&lt;/code&gt;, &lt;code&gt;-=&lt;/code&gt;, &lt;code&gt;*=&lt;/code&gt;, &lt;code&gt;/=&lt;/code&gt;, &lt;code&gt;%=&lt;/code&gt;, &lt;code&gt;//=&lt;/code&gt;, &lt;code&gt;**=&lt;/code&gt; &lt;em&gt;assignment operators&lt;/em&gt;. In Python assignment is a &lt;a href="https://docs.python.org/3/glossary.html#term-statement"&gt;statement&lt;/a&gt; and not an &lt;a href="https://docs.python.org/3/glossary.html#term-expression"&gt;expression&lt;/a&gt;. Consequently, Python does not support &lt;em&gt;in-line assignment&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Python features &lt;em&gt;sequence unpacking&lt;/em&gt; which means to assign elements of an iterable object into multiple variables, it's written as &lt;code&gt;as many variables as elements in sequence = sequence&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;import&lt;/code&gt; statement is used to import &lt;a href="(https://docs.python.org/3/glossary.html#term-module)"&gt;modules&lt;/a&gt;. Importing a python module, runs all of its contents. Use an &lt;code&gt;if __name__ == "__main__":&lt;/code&gt; code block to allow or prevent parts of code from being run when modules are imported.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Built-in types
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python's native types are &lt;em&gt;numbers&lt;/em&gt;, &lt;em&gt;sequences&lt;/em&gt;, &lt;em&gt;classes&lt;/em&gt;, &lt;em&gt;instances&lt;/em&gt; and &lt;em&gt;exceptions&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Mutability&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;boolean value&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;integer value&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;double-precision floating-point value&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3.14159&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;complex&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;complex number with real and imaginary parts&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1+2j&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;str&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;sequence of Unicode characters&lt;/td&gt;
&lt;td&gt;&lt;code&gt;'Python'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;sequence of bytes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;b'Python'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bytearray&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;mutable&lt;/td&gt;
&lt;td&gt;sequence of bytes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bytearray(b'Python')&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;mutable&lt;/td&gt;
&lt;td&gt;ordered sequence of values&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[3, True, 'Python']&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tuple&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;immutable&lt;/td&gt;
&lt;td&gt;ordered sequence of values&lt;/td&gt;
&lt;td&gt;&lt;code&gt;('Python', 5, False)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dict&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;mutable&lt;/td&gt;
&lt;td&gt;associative array of key and value pairs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{'name': 'Adam', 7: 'apple'}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;set&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;mutable&lt;/td&gt;
&lt;td&gt;unordered sequence of values with no duplicates&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{True, 11, 'Python'}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The table list the most commonly used types, but there are more types.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expressions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python follows mathematical &lt;em&gt;rules of precedence&lt;/em&gt; for mathematical operations: parentheses, exponentiation, multiplication &amp;amp; division, addition &amp;amp; subtraction, and operators with the same precedence are evaluated from left to right.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;**&lt;/code&gt; &lt;em&gt;arithmetic operators&lt;/em&gt;. There are two types of division in Python called &lt;em&gt;floor division&lt;/em&gt; (or &lt;em&gt;integer division&lt;/em&gt;) &lt;code&gt;//&lt;/code&gt; and &lt;em&gt;floating-point division&lt;/em&gt; &lt;code&gt;/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;,&lt;code&gt;&amp;lt;=&lt;/code&gt; &lt;em&gt;comparison operators&lt;/em&gt;. Comparisons may even be chained (e.g. &lt;code&gt;a &amp;lt;= b &amp;lt;= c&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Since Python 3.8, the &lt;em&gt;walrus operator&lt;/em&gt; &lt;code&gt;:=&lt;/code&gt; can be used to assign values to variables as part of an expression.&lt;/li&gt;
&lt;li&gt;Python uses the words &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt; for &lt;em&gt;Boolean&lt;/em&gt; (or &lt;em&gt;logic&lt;/em&gt;) &lt;em&gt;operators&lt;/em&gt; instead of the symbolic equivalent &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt; and &lt;code&gt;!&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;is&lt;/code&gt; and &lt;code&gt;is not&lt;/code&gt; &lt;em&gt;identity operators&lt;/em&gt; to check if two values refer to the same object or not.&lt;/li&gt;
&lt;li&gt;Python uses the &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; &lt;em&gt;membership operators&lt;/em&gt; to test whether or not a sequence contains a value. The &lt;code&gt;in&lt;/code&gt; keyword is also used to iterate through a sequence in a &lt;code&gt;for&lt;/code&gt;loop.&lt;/li&gt;
&lt;li&gt;Python makes a distinction between &lt;a href="https://docs.python.org/3/glossary.html#term-list"&gt;lists&lt;/a&gt; (&lt;a href="https://docs.python.org/3/glossary.html#term-mutable"&gt;mutable&lt;/a&gt;) written as &lt;code&gt;[2, 3, 5]&lt;/code&gt; and &lt;em&gt;tuples&lt;/em&gt; (&lt;a href="https://docs.python.org/3/glossary.html#term-immutable"&gt;immutable&lt;/a&gt;) written as &lt;code&gt;(7, 11, 13)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In Python strings can be &lt;em&gt;concatenated&lt;/em&gt; by adding them, using the arithmetic operator for addition.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Anonymous functions&lt;/em&gt; are implemented using &lt;a href="https://docs.python.org/3/glossary.html#term-lambda"&gt;lambda&lt;/a&gt; expressions that is written as &lt;code&gt;lambda [parameters]: expression&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In Python, a &lt;a href="https://docs.python.org/3/glossary.html#term-list-comprehension"&gt;List comprehension&lt;/a&gt; is written as &lt;code&gt;[expression for item in list]&lt;/code&gt;. List comprehensions are a more elegant and concise way to create lists. It can also be used when working with strings or tuples.&lt;/li&gt;
&lt;li&gt;A Python &lt;a href="https://docs.python.org/3/glossary.html#term-generator-expression"&gt;generator expression&lt;/a&gt; is written as &lt;code&gt;(expression for item in list)&lt;/code&gt;. These anonymous generator functions create a single element on request, and therefore more memory efficient than an equivalent list comprehension.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.python.org/dev/peps/pep-0308/"&gt;Conditional expressions&lt;/a&gt; are written as &lt;code&gt;X if condition else Y&lt;/code&gt;. The &lt;code&gt;condition&lt;/code&gt; is evaluated first. If &lt;code&gt;condition&lt;/code&gt; is &lt;code&gt;True&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt; is evaluated and its value is returned, and if &lt;code&gt;condition&lt;/code&gt; is &lt;code&gt;False&lt;/code&gt;, &lt;code&gt;Y&lt;/code&gt; is evaluated and its value is returned.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Uses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python can serve as a scripting language for automation.&lt;/li&gt;
&lt;li&gt;Python is often used for web development and web applications.&lt;/li&gt;
&lt;li&gt;Python competes against Fortran and C/C++ in scientific computing and data science.&lt;/li&gt;
&lt;li&gt;Python is commonly used in data analysis, artificial intelligence and machine learning.&lt;/li&gt;
&lt;li&gt;Python is often used in natural language processing.&lt;/li&gt;
&lt;li&gt;Python can be used in game development.&lt;/li&gt;
&lt;li&gt;Python is embedded in many software products as a scripting language.&lt;/li&gt;
&lt;li&gt;Many operating systems include Python as a standard component.&lt;/li&gt;
&lt;li&gt;Python is used extensively in information security and exploit development.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to Python</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Wed, 16 Feb 2022 13:36:02 +0000</pubDate>
      <link>https://forem.com/blikoor/introduction-to-python-36c2</link>
      <guid>https://forem.com/blikoor/introduction-to-python-36c2</guid>
      <description>&lt;p&gt;This Python series is for beginner programmers with some programming knowledge, but it is not required. Although not comprehensive, I hope that this series can quickly guide beginners past the initial syntax hurdle — so that they can spend more time writing code. &lt;/p&gt;

&lt;p&gt;It is important to note that the aim isn't to replace books, courses, tutorials, and other resources but rather to supplement the initial learning experience.&lt;/p&gt;

&lt;h4&gt;
  
  
  — Part 5 in the series is coming soon —
&lt;/h4&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Setting up a Python development environment</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Wed, 02 Feb 2022 12:52:45 +0000</pubDate>
      <link>https://forem.com/blikoor/setting-up-a-python-development-environment-5dh9</link>
      <guid>https://forem.com/blikoor/setting-up-a-python-development-environment-5dh9</guid>
      <description>&lt;p&gt;&lt;em&gt;The coverimage showcase a tutorial by Clear Code (&lt;a href="https://www.youtube.com/watch?v=QFvqStqPCRU" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;, &lt;a href="https://github.com/clear-code-projects/Snake" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you're a new programmer, much time and effort go into learning that first programming language. Once you gain enough familiarity with the ins and outs, you can start to invest time into building a development environment that will boost your productivity. Here follow my opinionated attempt to systematize some of the best practices for setting up a new Python development environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Windows Terminal

&lt;ul&gt;
&lt;li&gt;Execution policy&lt;/li&gt;
&lt;li&gt;New profiles&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Pyenv

&lt;ul&gt;
&lt;li&gt;Pyenv installation&lt;/li&gt;
&lt;li&gt;Pyenv maintenance&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Poetry

&lt;ul&gt;
&lt;li&gt;Poetry installation&lt;/li&gt;
&lt;li&gt;Poetry maintenance&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Git &amp;amp; GitHUb

&lt;ul&gt;
&lt;li&gt;Git installation&lt;/li&gt;
&lt;li&gt;Git maintenance&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Repository

&lt;ul&gt;
&lt;li&gt;Existing project&lt;/li&gt;
&lt;li&gt;New project&lt;/li&gt;
&lt;li&gt;Manage projects&lt;/li&gt;
&lt;li&gt;Fast track new repos&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

PyCharm

&lt;ul&gt;
&lt;li&gt;Open projects&lt;/li&gt;
&lt;li&gt;Configure Python interpreter&lt;/li&gt;
&lt;li&gt;Default project directory&lt;/li&gt;
&lt;li&gt;Suggested Plugins&lt;/li&gt;
&lt;li&gt;Install plugins&lt;/li&gt;
&lt;li&gt;IDE integration&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Known issues&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Windows Terminal &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Developers spend enough time in terminals and shell programs, to deserve a better terminal. Windows Terminal is a customizable multi-tabbed terminal application that can run any shell program or terminal emulator. The new command-line front-end can be installed from the &lt;a href="https://www.microsoft.com/en-za/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab" rel="noopener noreferrer"&gt;Microsoft Store&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Execution policy &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In Windows 10, the execution policy is set to restricted by default. This means that Windows PowerShell cannot execute any script, but you can change this policy. Refer to the &lt;a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1" rel="noopener noreferrer"&gt;Microsoft Docs&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;1. Open Windows PowerShell and type the following to get a list of all the execution policies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-List&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="n"&gt;Scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="o"&gt;-----&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;---------------&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MachinePolicy&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="nx"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;UserPolicy&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="nx"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="kr"&gt;Process&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;CurrentUser&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="nx"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;LocalMachine&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="nx"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Set the execution policy in the CurrentUser scope.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RemoteSigned&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CurrentUser&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;3. Verify that execution policy for the CurrentUser scope is set.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CurrentUser&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you later want to remove the execution policy, type the following.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Undefined&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CurrentUser&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  New profiles &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;If a command-line tool does not have a profile auto-generated for you, you can add it manually by editing the &lt;code&gt;settings.json&lt;/code&gt; file. Follow these steps to add a profile for most command-line tools and shells. Refer to the &lt;a href="https://docs.microsoft.com/en-us/windows/terminal/dynamic-profiles" rel="noopener noreferrer"&gt;Microsoft Docs&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h4&gt;
  
  
  Python terminal
&lt;/h4&gt;

&lt;p&gt;1. First you need to generate a &lt;code&gt;guid&lt;/code&gt; value. These take the format of {00000000-0000-0000-0000-000000000000}. You can generate a &lt;code&gt;guid&lt;/code&gt;in Windows PowerShell.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;guid&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;NewGuid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; 393188ce-14fa-4a3d-a556-21982206494a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Inspect the properties of the python terminal's shortcut, take note of the full path to the python executable, any command-line switches used, and the default starting directory.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nirrtiqxxwvgjta8clr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nirrtiqxxwvgjta8clr.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. You'll notice that the executable has an embedded icon, but Windows Terminal requires a separate icon or picture file. This step is optional, but if you like to add the icon to the new profile, you will have to extract it from the executable with a 3rd party tool. There are several free tools available, like &lt;a href="https://www.aurelitec.com/thumbico/windows/" rel="noopener noreferrer"&gt;Thumbico&lt;/a&gt;, &lt;a href="https://www.nirsoft.net/utils/iconsext.html" rel="noopener noreferrer"&gt;IconsExtract&lt;/a&gt;, &lt;a href="https://www.carifred.com/quick_any2ico/" rel="noopener noreferrer"&gt;Quick Any2Ico&lt;/a&gt; and &lt;a href="https://www.mitec.cz/iconex.html" rel="noopener noreferrer"&gt;IconExplorer&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsagbbairrpnmg2cji78h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsagbbairrpnmg2cji78h.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Press the &lt;em&gt;Ctrl + ,&lt;/em&gt; keyboard combination or open the drop-down menu and select &lt;em&gt;Settings&lt;/em&gt; and then click on &lt;em&gt;Open JSON file&lt;/em&gt;. to open the &lt;code&gt;settings.json&lt;/code&gt; file in your favourite text editor.&lt;/p&gt;

&lt;p&gt;5. Scroll down to find the &lt;code&gt;"profiles":&lt;/code&gt; section to add the new profile. Remember that you can make use of environment variables such as &lt;code&gt;%PROGRAMFILES%&lt;/code&gt; or &lt;code&gt;%USERPROFILE%&lt;/code&gt; in any path depending on where the executable is located. Copy the following profile into your &lt;code&gt;settings.json&lt;/code&gt;, but replace the contents of each property with the correct information.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"commandline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%USERPROFILE%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;AppData&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Local&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Programs&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python310&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;python.exe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"guid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{393188ce-14fa-4a3d-a556-21982206494a}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"hidden"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"icon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%USERPROFILE%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;AppData&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Local&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Programs&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python310&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;python.ico"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Python 3.10 (64-bit)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"startingDirectory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%USERPROFILE%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;AppData&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Local&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Programs&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Python310&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Git Bash terminal
&lt;/h4&gt;

&lt;p&gt;1. Similarly to the steps above, generate a &lt;code&gt;guid&lt;/code&gt; value in Windows PowerShell.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;guid&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;NewGuid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; da73a63c-697d-4a3f-b7c6-b51996b66c91
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Extract the icon from the executable.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8mq3ebulf00qz5dgdvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8mq3ebulf00qz5dgdvo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Open the &lt;code&gt;settings.json&lt;/code&gt; file in your favourite text editor, and add the new profile.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"commandline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%PROGRAMFILES%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Git&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bin&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bash.exe -li"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"guid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{da73a63c-697d-4a3f-b7c6-b51996b66c91}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"hidden"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"icon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%PROGRAMFILES%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Git&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;git.ico"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Git Bash"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"startingDirectory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%USERPROFILE%"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Git CMD terminal
&lt;/h4&gt;

&lt;p&gt;1. Generate a &lt;code&gt;guid&lt;/code&gt; value in Windows PowerShell.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;guid&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;NewGuid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; b8fc6eae-eb19-4e9e-8564-a2221b1ab55e
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Inspect the properties of the Git CMD terminal's shortcut.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuzcwpofqd0k1n6by9p5n.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuzcwpofqd0k1n6by9p5n.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Open the &lt;code&gt;settings.json&lt;/code&gt; file in your favourite text editor, and add the new profile.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"commandline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%PROGRAMFILES%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Git&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;git-cmd.exe --cd-to-home"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"guid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{da73a63c-697d-4a3f-b7c6-b51996b66c91}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"hidden"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"icon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%PROGRAMFILES%&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;Git&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;git.ico"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Git CMD"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"startingDirectory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"%USERPROFILE%"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h2&gt;
  
  
  pyenv &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Meet pyenv, a simple Python version management tool. It lets you change the global Python version, install multiple Python versions, set directory-specific Python versions, and create/manage virtual python environments.&lt;/p&gt;
&lt;h3&gt;
  
  
  Pyenv installation &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. Install &lt;a href="https://github.com/pyenv-win/pyenv-win" rel="noopener noreferrer"&gt;pyenv-win&lt;/a&gt; by following the &lt;a href="https://github.com/pyenv-win/pyenv-win#installation" rel="noopener noreferrer"&gt;instructions&lt;/a&gt;. You can download the &lt;a href="https://github.com/pyenv-win/pyenv-win/archive/master.zip" rel="noopener noreferrer"&gt;zip file&lt;/a&gt;, or if you already have Python installed like me, you can use pip instead.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Expand-Archive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-LiteralPath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\Downloads\pyenv-win-master.zip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-DestinationPath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\.pyenv&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OR&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv-win&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--target&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\.pyenv&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. If you already had Python installed, you need to disable the Python launcher.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right-click on the Start button or press the &lt;em&gt;Windows key + X&lt;/em&gt; keyboard combination.&lt;/li&gt;
&lt;li&gt;When the WinX menu opens, select &lt;em&gt;"Apps and Features"&lt;/em&gt;, then click on &lt;em&gt;"App Execution Aliases"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Turn off the App Installer aliases for Python.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3. Add new system environment variables for pyenv.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PYENV'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\.pyenv\pyenv-win\"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PYENV_ROOT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\.pyenv\pyenv-win\"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PYENV_HOME'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\.pyenv\pyenv-win\"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;4. Add pyenv to your user &lt;code&gt;Path&lt;/code&gt; variable.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\.pyenv\pyenv-win\bin;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\.pyenv\pyenv-win\shims;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;5. Close, reopen the terminal, and type the following to verify pyenv is working.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you receive an error: "Command not found.", check if the environment variables are set properly. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;em&gt;Windows key + R&lt;/em&gt; keyboard combination. &lt;/li&gt;
&lt;li&gt;When the Run application opens, type &lt;em&gt;SystemPropertiesAdvanced.exe&lt;/em&gt;, and click the Ok button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;6. Run rehash from your home directory (i.e. &lt;code&gt;%USERPROFILE%&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;7. Update the Python cached version database.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;8. List all the Python versions available to install.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;9. Install the latest stable Python version.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;10. Verify that the Python version was installed.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;versions&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;11. Set the global interpreter to the newly installed Python, if there is no global interpreter.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;12. Run rehash from your home directory (i.e. &lt;code&gt;%USERPROFILE%&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Pyenv maintenance &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To uninstall a Python version.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uninstall&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To update Python version changes and maintain shims, rehash from your home directory.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To update pyenv-win to the latest stable version.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--upgrade&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv-win&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h2&gt;
  
  
  Poetry &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.&lt;/p&gt;
&lt;h3&gt;
  
  
  Poetry installation &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Install &lt;a href="https://python-poetry.org/" rel="noopener noreferrer"&gt;Poetry&lt;/a&gt; by following these &lt;a href="https://python-poetry.org/docs/#installation" rel="noopener noreferrer"&gt;instructions&lt;/a&gt;. Poetry provides a custom installer that will install Poetry isolated from the rest of your system.&lt;/p&gt;

&lt;p&gt;1. Install Poetry by running the following script.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Invoke-WebRequest&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-UseBasicParsing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Content&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2. Verify that Poetry is working.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;3. If you receive an error: "Command not found.", add Poetry to your user &lt;code&gt;Path&lt;/code&gt; variable.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"\AppData\Roaming\Python\Scripts;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;4. Close, reopen the terminal, and type the following to verify that Poetry is working.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Poetry maintenance &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To Spawn a shell, according to the &lt;code&gt;$SHELL&lt;/code&gt; environment variable. A shell is required to use command line tools from within the virtual environment.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To uninstall Poetry run the installer again with the &lt;code&gt;--uninstall&lt;/code&gt; option or use pip.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uninstall&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OR&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install-poetry.py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--uninstall&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To update Poetry to the latest stable version.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;self&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To list the current configuration of Poetry.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To create the Virtualenv in the project's root directory.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;virtualenvs.in-project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To create the Virtualenv in the default directory.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;virtualenvs.in-project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;None&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h2&gt;
  
  
  Git &amp;amp; GitHub &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Git is a distributed version control system. GitHub provides internet hosting for software development and version control using Git. You can access GitHub in various ways: in the browser, via a desktop application, with the API, or via the command line.  Each way of accessing GitHub supports different modes of &lt;a href="https://docs.github.com/en/authentication" rel="noopener noreferrer"&gt;authentication&lt;/a&gt;. It should go without saying that these days everyone should protect their GitHub account with &lt;a href="https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa" rel="noopener noreferrer"&gt;Two-factor authentication (2FA)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To use Git on the command line, you'll need to download, install, and configure &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;Git&lt;/a&gt; or &lt;a href="https://cli.github.com/" rel="noopener noreferrer"&gt;GitHub CLI&lt;/a&gt;. If you don't want to use the command line, you can instead download and install the free &lt;a href="https://desktop.github.com/" rel="noopener noreferrer"&gt;GitHub Desktop&lt;/a&gt; or &lt;a href="https://www.sourcetreeapp.com/" rel="noopener noreferrer"&gt;Sourcetree&lt;/a&gt; clients.&lt;/p&gt;

&lt;p&gt;When connecting to a GitHub repository from Git, you'll need to authenticate with GitHub using either HTTPS &lt;a href="https://docs.github.com/en/get-started/quickstart/set-up-git#connecting-over-https-recommended" rel="noopener noreferrer"&gt;(recommended)&lt;/a&gt; or SSH. Although SSH-based authentication is considered the most secure, it can be more of a challenge to set up and manage. On the other hand, the less secure HTTPS-based authentication is much easier to use and provides the flexibility to authorize tokens for specific tasks.&lt;/p&gt;

&lt;p&gt;It can be time-consuming and frustrating to enter credentials every time we interact with repositories. When connecting to a GitHub repository, every connection needs a username &amp;amp; password (PAT) when using the HTTPS protocol and an SSH key passphrase when using the SSH protocol. The Git credential system and ssh-agent can reduce this annoyance.&lt;/p&gt;


&lt;h4&gt;
  
  
  Git credentials system
&lt;/h4&gt;

&lt;p&gt;The Git credential-helper can be configured in several modes: &lt;code&gt;cache&lt;/code&gt;, &lt;code&gt;store&lt;/code&gt;, &lt;code&gt;osxkeychain&lt;/code&gt;, &lt;del&gt;&lt;code&gt;winstore&lt;/code&gt;&lt;/del&gt;, &lt;del&gt;&lt;code&gt;manager&lt;/code&gt;&lt;/del&gt;, and most notably &lt;code&gt;manager-core&lt;/code&gt;.&lt;br&gt;
In Windows, since &lt;a href="https://newreleases.io/project/github/git-for-windows/git/release/v2.29.0.windows.1" rel="noopener noreferrer"&gt;Git v2.29.0.windows.1&lt;/a&gt;, Git comes with a bundled Git Credential Manager Core (GCM Core), which provides secure git credential storage. GCM Core is the default setting on Windows and called implicitly by Git. Git will initially request a username and PAT when interacting with a repository. On subsequent interactions, Git will re-use existing credentials or tokens that GCM Core stored as long as they're valid. Refer to the &lt;a href="https://git-scm.com/book/it/v2/Git-Tools-Credential-Storage" rel="noopener noreferrer"&gt;Pro Git Book&lt;/a&gt;, and &lt;a href="https://git-scm.com/docs/gitcredentials" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt; for more information.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/git-ecosystem" rel="noopener noreferrer"&gt;
        git-ecosystem
      &lt;/a&gt; / &lt;a href="https://github.com/git-ecosystem/git-credential-manager" rel="noopener noreferrer"&gt;
        git-credential-manager
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Git Credential Manager&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/git-ecosystem/git-credential-manager/actions/workflows/continuous-integration.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/git-ecosystem/git-credential-manager/actions/workflows/continuous-integration.yml/badge.svg" alt="Build Status"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://github.com/git-ecosystem/git-credential-manager" rel="noopener noreferrer"&gt;Git Credential Manager&lt;/a&gt; (GCM) is a secure
&lt;a href="https://git-scm.com/docs/gitcredentials" rel="nofollow noopener noreferrer"&gt;Git credential helper&lt;/a&gt; built on &lt;a href="https://dotnet.microsoft.com" rel="nofollow noopener noreferrer"&gt;.NET&lt;/a&gt; that runs
on Windows, macOS, and Linux. It aims to provide a consistent and secure
authentication experience, including multi-factor auth, to every major source
control hosting service and platform.&lt;/p&gt;
&lt;p&gt;GCM supports (in alphabetical order) &lt;a href="https://azure.microsoft.com/en-us/products/devops" rel="nofollow noopener noreferrer"&gt;Azure DevOps&lt;/a&gt;, Azure DevOps
Server (formerly Team Foundation Server), Bitbucket, GitHub, and GitLab
Compare to Git's &lt;a href="https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage" rel="nofollow noopener noreferrer"&gt;built-in credential helpers&lt;/a&gt;
(Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret), which
provide single-factor authentication support for username/password only.&lt;/p&gt;
&lt;p&gt;GCM replaces both the .NET Framework-based
&lt;a href="https://github.com/microsoft/Git-Credential-Manager-for-Windows" rel="noopener noreferrer"&gt;Git Credential Manager for Windows&lt;/a&gt; and the Java-based
&lt;a href="https://github.com/microsoft/Git-Credential-Manager-for-Mac-and-Linux" rel="noopener noreferrer"&gt;Git Credential Manager for Mac and Linux&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Install&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;See the &lt;a href="https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/install.md" rel="noopener noreferrer"&gt;installation instructions&lt;/a&gt; for the current version of GCM for
install options for your operating system.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Current status&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Git Credential Manager is currently available for Windows, macOS, and Linux*.
GCM only works with HTTP(S) remotes; you can still use Git with SSH:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;…&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/git-ecosystem/git-credential-manager" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;h4&gt;
  
  
  ssh-agent
&lt;/h4&gt;

&lt;p&gt;The ssh-agent that is included with git, while technically a Windows executable, is configured for a pseudo-Linux environment. Thankfully, Windows 10 (version 1809 and later) now incorporate an SSH client to provide SSH authentication without using any &lt;a href="https://putty.org/" rel="noopener noreferrer"&gt;third-party clients&lt;/a&gt;. &lt;a href="https://github.com/PowerShell/openssh-portable" rel="noopener noreferrer"&gt;Portable OpenSSH&lt;/a&gt; is the Microsoft fork of the &lt;a href="https://www.openssh.com/" rel="noopener noreferrer"&gt;OpenSSH&lt;/a&gt; open source project. Once the ssh-agent is running as a service that stores your various SSH keys, this can facilitate authentication without entering a passphrase each time. Refer to the &lt;a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key" rel="noopener noreferrer"&gt;Pro Git Book&lt;/a&gt;, &lt;a href="https://www.openssh.com/manual.html" rel="noopener noreferrer"&gt;OpenSSH Manual&lt;/a&gt;, and &lt;a href="https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview" rel="noopener noreferrer"&gt;Microsoft Docs&lt;/a&gt; for more information.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/PowerShell" rel="noopener noreferrer"&gt;
        PowerShell
      &lt;/a&gt; / &lt;a href="https://github.com/PowerShell/openssh-portable" rel="noopener noreferrer"&gt;
        openssh-portable
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Portable OpenSSH, all Win32-OpenSSH releases and wiki are managed at https://github.com/powershell/Win32-OpenSSH
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Portable OpenSSH&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg" alt="C/C++ CI"&gt;&lt;/a&gt;
&lt;a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&amp;amp;can=1&amp;amp;q=proj:openssh" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b0ba909c59eb58bccfc007a6a69bf31634892bbdb2c3182807349ba0a99bc3c8/68747470733a2f2f6f73732d66757a7a2d6275696c642d6c6f67732e73746f726167652e676f6f676c65617069732e636f6d2f6261646765732f6f70656e7373682e737667" alt="Fuzzing Status"&gt;&lt;/a&gt;
&lt;a href="https://scan.coverity.com/projects/openssh-portable" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ca655de163faa3aae8c1e54e2634ff7d9a3566a67c8a2e7e4aee1aad59828b5e/68747470733a2f2f7363616e2e636f7665726974792e636f6d2f70726f6a656374732f32313334312f62616467652e737667" alt="Coverity Status"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;OpenSSH is a complete implementation of the SSH protocol (version 2) for secure remote login, command execution and file transfer. It includes a client &lt;code&gt;ssh&lt;/code&gt; and server &lt;code&gt;sshd&lt;/code&gt;, file transfer utilities &lt;code&gt;scp&lt;/code&gt; and &lt;code&gt;sftp&lt;/code&gt; as well as tools for key generation (&lt;code&gt;ssh-keygen&lt;/code&gt;), run-time key storage (&lt;code&gt;ssh-agent&lt;/code&gt;) and a number of supporting programs.&lt;/p&gt;
&lt;p&gt;This is a port of OpenBSD's &lt;a href="https://openssh.com" rel="nofollow noopener noreferrer"&gt;OpenSSH&lt;/a&gt; to most Unix-like operating systems, including Linux, OS X and Cygwin. Portable OpenSSH polyfills OpenBSD APIs that are not available elsewhere, adds sshd sandboxing for more operating systems and includes support for OS-native authentication and auditing (e.g. using PAM).&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Documentation&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The official documentation for OpenSSH are the man pages for each tool:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/ssh.1" rel="nofollow noopener noreferrer"&gt;ssh(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/sshd.8" rel="nofollow noopener noreferrer"&gt;sshd(8)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/ssh-keygen.1" rel="nofollow noopener noreferrer"&gt;ssh-keygen(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/ssh-agent.1" rel="nofollow noopener noreferrer"&gt;ssh-agent(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/scp.1" rel="nofollow noopener noreferrer"&gt;scp(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/sftp.1" rel="nofollow noopener noreferrer"&gt;sftp(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/ssh-keyscan.8" rel="nofollow noopener noreferrer"&gt;ssh-keyscan(8)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://man.openbsd.org/sftp-server.8" rel="nofollow noopener noreferrer"&gt;sftp-server(8)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Stable Releases&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Stable release tarballs are available from a number of &lt;a href="https://www.openssh.com/portable.html#downloads" rel="nofollow noopener noreferrer"&gt;download mirrors&lt;/a&gt;. We recommend the use of a stable release for most…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/PowerShell/openssh-portable" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
back to top
&lt;h3&gt;
  
  
  Git installation &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. Download, run &lt;a href="https://gitforwindows.org/" rel="noopener noreferrer"&gt;Git for Windows&lt;/a&gt; and follow the installation wizard steps. Refer to the &lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" rel="noopener noreferrer"&gt;Pro Git book&lt;/a&gt; for more information.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5ddlw6s6rj6d7m11hxl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5ddlw6s6rj6d7m11hxl.gif" alt="Animation of Git installation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Open a terminal and type the following, to set your Git usename.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;user.name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blikoor&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;3. Set your email, if email privacy is enabled on remote, use the GitHub-provided noreply email address. Refere to &lt;a href="https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;user.email&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;60975288&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;blikoor&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;users.noreply.github.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;4. Create a &lt;code&gt;~/.gitcommit_template&lt;/code&gt; file. Using a custom commit template can help you to follow a structured outline and make better commit messages. A good starting point will be to read more about &lt;a href="https://chris.beams.io/posts/git-commit/" rel="noopener noreferrer"&gt;well-written&lt;/a&gt; commit messages and following the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/" rel="noopener noreferrer"&gt;Conventional Commits&lt;/a&gt; specification. Copy everything below into your own file.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#Conventional Commits 1.0.0&lt;/span&gt;
&lt;span class="c"&gt;# Please enter the commit message for your changes. Lines starting&lt;/span&gt;
&lt;span class="c"&gt;# with '#' will be ignored, and an empty message aborts the commit.&lt;/span&gt;
&lt;span class="c"&gt;# Separate subject, body and footer(s) with a blank line.&lt;/span&gt;
&lt;span class="c"&gt;# --------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c"&gt;# The commit message should be structured as follows:&lt;/span&gt;
&lt;span class="c"&gt;# &amp;lt;type&amp;gt;[optional scope]: &amp;lt;description&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;# |&amp;lt;----   Use a maximum of 50 characters   ----&amp;gt;|&lt;/span&gt;


&lt;span class="c"&gt;# Why was this change made?&lt;/span&gt;
&lt;span class="c"&gt;# [optional body]&lt;/span&gt;
&lt;span class="c"&gt;# --------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c"&gt;# |&amp;lt;---   Try To Limit Each Line to a Maximum Of 70 Characters   ---&amp;gt;|&lt;/span&gt;


&lt;span class="c"&gt;# [optional footer(s)]&lt;/span&gt;
&lt;span class="c"&gt;# Provide links or keys to any relevant tickets, articles, etc.&lt;/span&gt;
&lt;span class="c"&gt;# Example: Github issue #23&lt;/span&gt;
&lt;span class="c"&gt;# --------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c"&gt;# Types can be&lt;/span&gt;
&lt;span class="c"&gt;#    feat       - introduces a new feature to the codebase&lt;/span&gt;
&lt;span class="c"&gt;#    fix        - bug fix for your application&lt;/span&gt;
&lt;span class="c"&gt;#    refactor   - refactoring production code&lt;/span&gt;
&lt;span class="c"&gt;#    style      - formatting, corrections, etc; no code change&lt;/span&gt;
&lt;span class="c"&gt;#    docs       - changes to documentation&lt;/span&gt;
&lt;span class="c"&gt;#    test       - adding or refactoring tests; no code change&lt;/span&gt;
&lt;span class="c"&gt;#    chore      - updating grunt tasks etc; no code change&lt;/span&gt;
&lt;span class="c"&gt;# Use ! to draw attention to a breaking change&lt;/span&gt;
&lt;span class="c"&gt;# --------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c"&gt;# For more information, visit:&lt;/span&gt;
&lt;span class="c"&gt;# https://www.conventionalcommits.org/en/v1.0.0/&lt;/span&gt;
&lt;span class="c"&gt;# https://chris.beams.io/posts/git-commit/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;5. Set the default global commit template. Refer to the &lt;a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration" rel="noopener noreferrer"&gt;Pro Git Book&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;commit.template&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;~/.gitcommit_template&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6. Choose between creating and using a personal access token (PAT) or a Secure Shell (SSH) public/private key pair for authentication.&lt;/p&gt;


&lt;h4&gt;
  
  
  Personal access token
&lt;/h4&gt;

&lt;p&gt;6.1 Verify that your configuration setting for the Git credential-helper is set to &lt;code&gt;manager-core&lt;/code&gt;. As mentioned earlier, if you installed the latest Git for Windows release, GCM Core should be the default setting. If this isn't the case for you, refer to Git maintenance for more information.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;credential.helper&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;manager-core&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.2 Create a personal access token on GitHub in your &lt;a href="https://github.com/settings/tokens" rel="noopener noreferrer"&gt;account settings&lt;/a&gt;, by following the visual instructions. Setting an expiration date on personal access tokens is recommended, tokens that expire can be regenerated. Refer to &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt; for more information.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hmlx6q1jcon8cr62xdt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hmlx6q1jcon8cr62xdt.gif" alt="Animation of How to create tokens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6.3 Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/blikoor/pygame-pong.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.4 When prompted, type your username and paste the PAT you copied.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Username:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blikoor&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Password:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;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&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  SSH Public/Private key pair
&lt;/h4&gt;

&lt;p&gt;The Windows OpenSSH client and server are optional features that might need to be installed.&lt;br&gt;
6.1 Install OpenSSH through Windows Settings, follow the steps below.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right-click on the Start button or press the &lt;em&gt;Windows key + X&lt;/em&gt; keyboard combination.&lt;/li&gt;
&lt;li&gt;When the WinX menu opens, select &lt;em&gt;"Apps and Features"&lt;/em&gt;, then click on &lt;em&gt;"Optional features"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Verify that the &lt;em&gt;OpenSSH Client&lt;/em&gt; appear in the list of installed features.&lt;/li&gt;
&lt;li&gt;If not click on &lt;em&gt;"Add a feature"&lt;/em&gt; to install it.&lt;/li&gt;
&lt;li&gt;Type &lt;em&gt;'ssh'&lt;/em&gt; in the search dialog box to find all the SSH features.&lt;/li&gt;
&lt;li&gt;Click the corresponding check box, and click the Install button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;Install OpenSSH using Windows PowerShell, run PowerShell as an Administrator. Verify whether or not OpenSSH is already available.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-WindowsCapability&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Online&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Where-Object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'OpenSSH*'&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;OpenSSH.Client~~~~0.0.1.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Installed&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;OpenSSH.Server~~~~0.0.1.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NotPresent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If not, install the OpenSSH client component. Refer to &lt;a href="https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse" rel="noopener noreferrer"&gt;Microsoft Docs&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Add-WindowsCapability&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Online&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;OpenSSH.Client~~~~0.0.1.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.2 After installing OpenSSH in Windows, verify the status of the SSH services.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;get-service&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Status&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="nx"&gt;DisplayName&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;------&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;----&lt;/span&gt;&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="o"&gt;-----------&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Stopped&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ssh-agent&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nx"&gt;OpenSSH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Authentication&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.3 The ssh-agent service needs to be started and can also be configured to start automatically with Windows. Run PowerShell as an Administrator.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Start-Service&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Set-Service&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-StartupType&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Automatic&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.4 Verify that the path for the ssh-agent used by Git is properly configured and associated with OpenSSH in Windows. Validate that your output is similar. The ssh-agent executable should be in the System32 directory, not the Git for Windows program directory (&lt;code&gt;C:\Program Files\Git\cmd\start-ssh-agent.cmd&lt;/code&gt;). If this isn't the case for you, refer to Known issues for solutions.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Select-Object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Source&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Source&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;------&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;C:\Windows\System32\OpenSSH\ssh.exe&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.5 Check for existing SSH keys before generating a new key pair. The default filenames for public and private keys respectively look like the following: &lt;code&gt;id_ed25519.pub&lt;/code&gt;, &lt;code&gt;id_ed25519&lt;/code&gt;, &lt;code&gt;id_rsa.pub&lt;/code&gt;, &lt;code&gt;id_rsa&lt;/code&gt;. If you receive an error: &lt;em&gt;"No such file or directory."&lt;/em&gt;, you do not have existing SSH key pairs in the default location.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-ChildItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\.ssh&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.6 Generate a new SSH key pair if you don't have a supported SSH key or don't wish to use any that are available. Only use the RSA algorithm when your system don't support Ed25519.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-keygen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ed25519&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OR&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-keygen&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rsa&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;4096&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;When prompted to enter a file in which to save the key, press Enter. This accepts the default file and location.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;save&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;key:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Press&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;enter&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;When prompted, type a secure passphrase.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;empty&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;no&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;same&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;again:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;passphrase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;again&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.7 Now that the keys are generated, add the private key to the ssh-agent and the public key to your GitHub account.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\.ssh\id_ed25519&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.8 Add the public key to your GitHub account. Open the &lt;code&gt;id_ed25519.pub&lt;/code&gt; file in a text editor. The contents of this file is your public key. Select and copy everything. Follow the visual instructions to add the key to GitHub account.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8l8oi28sl7v4by0atlne.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8l8oi28sl7v4by0atlne.gif" alt="Animation of how to add keys to GitHub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6.9 Only after generating SSH keys, adding them to the ssh-agent and your GitHub account, can you test the SSH connection.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-T&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;github.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;authenticity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;host&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'github.com (IP ADDRESS)'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;can&lt;/span&gt;&lt;span class="s1"&gt;'t be established.
&amp;gt; RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
&amp;gt; Are you sure you want to continue connecting (yes/no)?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Verify that the fingerprint in the message you see matches &lt;a href="https://docs.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints" rel="noopener noreferrer"&gt;GitHub's RSA public key fingerprint&lt;/a&gt;. If it does, then type yes.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Hi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;You&lt;/span&gt;&lt;span class="s1"&gt;'ve successfully authenticated, but GitHub does not
&amp;gt; provide shell access.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Git maintenance &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It turned out to be quite challenging to manage SSH keys. I couldn't even figure out how to just list all keys, delete all keys, and delete individual keys stored by the ssh-agent.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/blikoor" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F698820%2F44cac420-0f39-49e9-8abe-4bec651f4a9e.jpeg" alt="blikoor"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/blikoor/how-do-you-manage-ssh-keys-stored-in-the-ssh-agent-portable-openssh-4766" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How do I manage SSH keys stored in the ssh-agent (Portable OpenSSH)?&lt;/h2&gt;
      &lt;h3&gt;Blikoor ・ Nov 18 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#git&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#github&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#help&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#openssh&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;p&gt;In contrast, the Credential Manager (GCM Core) not only allows you to save your credentials but also allows you to view, delete, add, backup, and restore credentials. There are two ways to open the Credential Manager in windows.&lt;br&gt;
Open the Control Panel and click on &lt;em&gt;User Accounts&lt;/em&gt;, &lt;em&gt;Credential Manager&lt;/em&gt;, and &lt;em&gt;Windows Credentials&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;Run the Credential Manager Command Line Utility.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rundll32.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;keymgr.dll&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;KRShowKeyMgr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To set or change your default editor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;core.editor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;~/AppData/Local/atom/app-1.58.0/atom.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--wait&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list the global configuration variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list all of your configuration variables and from where they are coming.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git config &lt;span class="nt"&gt;--show-origin&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list your configuration variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git config &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list the local repository's configuration variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git config &lt;span class="nt"&gt;--local&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list existing remotes of the local repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add the remote connection that points to the original repository. This allows you to sync changes made in both repositories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote add upstream https://github.com/blikoor/pygame-pong.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To rename an existing remote connection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote rename origen origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch the remote connection from HTTPS to SSH, your URL might look like: &lt;code&gt;git@github.com:USERNAME/REPOSITORY.git&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote set-url origin git@github.com:blikoor/pygame-pong.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch the remote connection from SSH to HTTPS, your URL might look like: &lt;code&gt;https://github.com/USERNAME/REPOSITORY.git&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote set-url origin https://github.com/blikoor/pygame-pong.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check the installed Git version. Make sure that &lt;em&gt;Git v2.29.0.windows.1&lt;/em&gt; or later is installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check the installed GCM Core version. Make sure that &lt;em&gt;GCM Core v2.0.252.766&lt;/em&gt; or later is installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git credential-manager-core &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To set the Git credential-helper to &lt;code&gt;manager-core&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper manager-core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to top&lt;/p&gt;

&lt;h2&gt;
  
  
  Repository &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Local repositories reside on the developers' computers. In contrast, remote repositories are hosted on a server that is accessible for all team members.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Existing project &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Open a terminal and change your current directory to the parent directory for the project (e.g., &lt;code&gt;C:\repos&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;1. Clone a repository from GitHub to your local computer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/repos&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;clone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/blikoor/pygame-pong.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. Change your current directory to the project directory (e.g., &lt;code&gt;C:\repos\your-project&lt;/code&gt;), and set a Python version as the local version for this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pygame-pong&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. Verify the active Python version for this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;versions&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Make a virtual environment with Poetry and Virtualenv.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5. Spawn a shell, according to the &lt;code&gt;$SHELL&lt;/code&gt; environment variable. A shell is required to use command line tools from within the virtual environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. Install the dependencies, as specified in the &lt;code&gt;pyproject.toml&lt;/code&gt; and &lt;code&gt;poetry.lock&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to top&lt;/p&gt;

&lt;h3&gt;
  
  
  New project &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Open a terminal and change your current directory to the parent directory for the project (e.g., &lt;code&gt;C:\repos&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;1. Create a directory structure for the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/repos&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pygame-pong&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. Change your current directory to the project directory (e.g., &lt;code&gt;C:\repos\your-project&lt;/code&gt;), and set a Python version as the local version for this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pygame-pong&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. Verify the active Python version for this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;versions&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Make a virtual environment with Poetry and Virtualenv.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5. Spawn a shell, according to the &lt;code&gt;$SHELL&lt;/code&gt; environment variable. A shell is required to use command line tools from within the virtual environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6. Initialize the repository of your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7. Add the primary remote HTTPS or SSH connection for the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# to add the remote HTTPS connection&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://github.com/blikoor/pygame-pong.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# to add the remote SSH connection&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;github.com:blikoor/pygame-pong.git&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8. Create a &lt;code&gt;.gitignore&lt;/code&gt; file in your repository's root directory to tell Git which files and directories to ignore when you make a commit. The &lt;a href="https://github.com/github/gitignore" rel="noopener noreferrer"&gt;github/gitignore&lt;/a&gt; public repository has a comprehensive list of examples, and the &lt;a href="https://www.toptal.com/developers/gitignore" rel="noopener noreferrer"&gt;gitignore.io&lt;/a&gt; website can generate a &lt;code&gt;.gitignore&lt;/code&gt; file for you. For more information refer to the &lt;a href="https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring" rel="noopener noreferrer"&gt;Pro Git book&lt;/a&gt;, &lt;a href="https://git-scm.com/docs/gitignore" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt;, and &lt;a href="https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;9. Create a &lt;code&gt;.gitattributes&lt;/code&gt; file in your repository's root directory to keep certain files from displaying in diffs, or counting towards the repository language stats. The &lt;a href="https://github.com/alexkaratarakis/gitattributes" rel="noopener noreferrer"&gt;alexkaratarakis/gitattributes&lt;/a&gt; public repository has a comphensive list of examples. For more information refer to the &lt;a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes" rel="noopener noreferrer"&gt;Pro Git book&lt;/a&gt;, &lt;a href="https://www.git-scm.com/docs/gitattributes" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt; and &lt;a href="https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt;.&lt;/p&gt;




&lt;h4&gt;
  
  
  Production dependencies
&lt;/h4&gt;

&lt;p&gt;Install the libraries or frameworks used to build the project.&lt;/p&gt;

&lt;p&gt;10. Add pygame to the virtual environment. &lt;a href="https://www.pygame.org/news" rel="noopener noreferrer"&gt;Pygame&lt;/a&gt; is a cross-platform set of Python modules designed for developing video games.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pygame&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Development dependencies
&lt;/h4&gt;

&lt;p&gt;Install packages to use during the development of the project.&lt;/p&gt;

&lt;p&gt;11. Add pytest-cov to the virtual environment. The plugin &lt;a href="https://pypi.org/project/pytest-cov/" rel="noopener noreferrer"&gt;pytest-cov&lt;/a&gt; provides some extra functionality for &lt;a href="https://docs.pytest.org/" rel="noopener noreferrer"&gt;pytest&lt;/a&gt;, Poetry's default testing framework. Poetry already created the tests folder structure along with the rest of the project directory structure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pytest-cov&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;12. Add Pylint to the virtual environment. &lt;a href="https://pylint.org/" rel="noopener noreferrer"&gt;Pylint&lt;/a&gt; is a tool for finding bugs and style problems in Python source code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pylint&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;13. Pylint isn’t perfect, you need a configuration file to take full advantage of it. Download Google's &lt;a href="https://google.github.io/styleguide/pylintrc" rel="noopener noreferrer"&gt;pylintrc&lt;/a&gt; file and save it in the project's root directory. Another option is to generate a sample &lt;code&gt;.pylintrc&lt;/code&gt; file with &lt;code&gt;--generate-rcfile&lt;/code&gt; and configure it yourself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pylint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--generate-rcfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pylintrc&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;14. Since the Google internal style guide differ slightly from &lt;a href="https://www.python.org/dev/peps/pep-0008/" rel="noopener noreferrer"&gt;PEP 8&lt;/a&gt;, we need to customize their &lt;code&gt;.pylintrc&lt;/code&gt; file to avoid conflicts between Pylint and Black (installed next). Open the &lt;code&gt;.pylintrc&lt;/code&gt; file in a text editor and search for the &lt;code&gt;indent-string&lt;/code&gt; setting. Copy and replace it with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;indent-string&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'    '&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;15. Verify that Pylint is working (shell required).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pylint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;16. Add Black to the virtual environment. &lt;a href="https://github.com/psf/black" rel="noopener noreferrer"&gt;Black&lt;/a&gt; is a uncompromising Python code formatter. Black is still in beta at the time of writing, hence allowing pre-releases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;black&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--allow-prereleases&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;17. Verify that Black is working (Shell required).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;black&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18. Add mypy to the virtual environment. &lt;a href="https://github.com/python/mypy" rel="noopener noreferrer"&gt;mypy&lt;/a&gt; is a static type checker for Python.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mypy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;19. Verify that mypy is working (shell required).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mypy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;20. mypy is the de facto static type checker for Python. However, its default configuration is too lenient. Custom configuration settings can be added to a &lt;code&gt;mypy.ini&lt;/code&gt; file. Refer to the &lt;a href="https://mypy.readthedocs.io/en/stable/config_file.html#config-file" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; or use the example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;mypy]
disallow_untyped_defs &lt;span class="o"&gt;=&lt;/span&gt; True
disallow_any_unimported &lt;span class="o"&gt;=&lt;/span&gt; True
no_implicit_optional &lt;span class="o"&gt;=&lt;/span&gt; True
check_untyped_defs &lt;span class="o"&gt;=&lt;/span&gt; True
warn_return_any &lt;span class="o"&gt;=&lt;/span&gt; True
show_error_codes &lt;span class="o"&gt;=&lt;/span&gt; True
warn_unused_ignores &lt;span class="o"&gt;=&lt;/span&gt; True
warn_unused_configs &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The best mypy configuration depends on the project. As a rule of thumb, make the configuration strict by default and loosen it per module if needed. A good practice when using an &lt;a href="https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker" rel="noopener noreferrer"&gt;ignore comment&lt;/a&gt; is to ignore only the specific type of an error instead of silencing mypy completely for a line of code. In other words, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# type: ignore[&amp;lt;error-code&amp;gt;]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;21. Add isort to the virtual environment. &lt;a href="https://pypi.org/project/isort/" rel="noopener noreferrer"&gt;isort&lt;/a&gt; is a utility that sort imports alphabetically, and automatically separated into sections and by type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isort&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;22. Verify that isort is working (shell required).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isort&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;23. isort needs some configuration for compatibility with Black. The configuration settings can be added to a dedicated &lt;code&gt;.isort.cfg&lt;/code&gt; file. Refer to the &lt;a href="https://pycqa.github.io/isort/docs/configuration/black_compatibility.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; or use the example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;settings]
profile &lt;span class="o"&gt;=&lt;/span&gt; black
multi_line_output &lt;span class="o"&gt;=&lt;/span&gt; 3
include_trailing_comma &lt;span class="o"&gt;=&lt;/span&gt; True
force_grid_wrap &lt;span class="o"&gt;=&lt;/span&gt; 0
use_parentheses &lt;span class="o"&gt;=&lt;/span&gt; True
line_length &lt;span class="o"&gt;=&lt;/span&gt; 88
skip_gitignore &lt;span class="o"&gt;=&lt;/span&gt; True
ensure_newline_before_comments &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;24. Add pre-commit to the virtual environment. &lt;a href="https://pre-commit.com/" rel="noopener noreferrer"&gt;pre-commit&lt;/a&gt; is a framework for managing and maintaining multi-language pre-commit hooks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;25. Verify that pre-commit is working (shell required).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;26. Create a pre-commit configuration file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;sample-config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pre-commit-config&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;yaml&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;27. Install the Git hook scripts so that pre-commit run automatically on each commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; pre-commit installed at .git/hooks/pre-commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;28. Add pre-commit plugin hooks to the &lt;code&gt;.pre-commit-config.yaml&lt;/code&gt; file. Copy everything below and append it to your configuration file, but change the repository mappings of each hook to reflect the correct version. Refer to the documentation for more &lt;a href="https://pre-commit.com/hooks.html" rel="noopener noreferrer"&gt;supported hooks&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;-   repo: https://github.com/PyCQA/pylint
    rev: v2.12.2
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: pylint
-   repo: https://github.com/psf/black
    rev: 21.12b0
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: black
-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.930
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: mypy
-   repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: isort
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;29. Update the hooks to the latest version automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;autoupdate&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;30. Run the hooks against all of the files after adding new hooks, usually pre-commit will only run on the changed files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;pre-commit run &lt;span class="nt"&gt;--all-files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to top&lt;/p&gt;

&lt;h2&gt;
  
  
  Manage projects &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It is best to manage the project in the project folder and from within a shell for the virtual environment.&lt;/p&gt;

&lt;p&gt;To see isort's configuration, as well as sources of config options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isort&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--show-config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see the files isort will process with the current configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isort&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--show-files&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get basic information about the currently activated virtual environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;info&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To list environments associated with this project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check the &lt;code&gt;pyproject.toml&lt;/code&gt; file for errors.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;check&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To show a breakdown of all the packages currently installed to the project, including dependencies of dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;show&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To update dependencies specified in the &lt;code&gt;pyproject.toml&lt;/code&gt; to their latest versions, and update the &lt;code&gt;poetry.lock&lt;/code&gt; file accordingly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To export the &lt;code&gt;poetry.lock&lt;/code&gt; file of the project to a &lt;code&gt;requirements.txt&lt;/code&gt; file for some reason.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-f&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove dependencies from the virtual environment, updating the &lt;code&gt;pyproject.toml&lt;/code&gt; and &lt;code&gt;poetry.lock&lt;/code&gt; files accordingly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;package-name&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To update the project's Python version to the latest released version. Make sure to run the first set of commands from your home directory and the second set from the project root folder. Verify that the &lt;code&gt;[tool.poetry.dependencies]&lt;/code&gt; section in the &lt;code&gt;pyproject.toml&lt;/code&gt; file, reflect the new Python version. Remember to configure the new virtualenv for the project in the Pycharm IDE.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;versions&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To delete existing virtual environments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;info&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pygame-pong-hEbvnVPS-py3.10&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To unset a Python version as the local version for this directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--unset&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fast track new repos &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Here is how you can create a new project in a just a couple of minutes, assuming you have Pyenv and Poetry installed already.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open a terminal and type the following:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/repos&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;your-project&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;your-project&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pyenv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.10.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pytest-cov&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pylint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mypy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;isort&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;black&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--allow-prereleases&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;sample-config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pre-commit-config&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;yaml&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pre-commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. Download Google's &lt;a href="https://google.github.io/styleguide/pylintrc" rel="noopener noreferrer"&gt;pylintrc&lt;/a&gt; file and save it in the project's root directory. Open the &lt;code&gt;.pylintrc&lt;/code&gt; file in a text editor to replace the &lt;code&gt;indent-string&lt;/code&gt; setting with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;indent-string&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'    '&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. Copy everything below and paste it into a &lt;code&gt;mypy.ini&lt;/code&gt; file within the project's root directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;mypy]
disallow_untyped_defs &lt;span class="o"&gt;=&lt;/span&gt; True
disallow_any_unimported &lt;span class="o"&gt;=&lt;/span&gt; True
no_implicit_optional &lt;span class="o"&gt;=&lt;/span&gt; True
check_untyped_defs &lt;span class="o"&gt;=&lt;/span&gt; True
warn_return_any &lt;span class="o"&gt;=&lt;/span&gt; True
show_error_codes &lt;span class="o"&gt;=&lt;/span&gt; True
warn_unused_ignores &lt;span class="o"&gt;=&lt;/span&gt; True
warn_unused_configs &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Copy everything below and paste it into a &lt;code&gt;.isort.cfg&lt;/code&gt; file within the project's root directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;settings]
profile &lt;span class="o"&gt;=&lt;/span&gt; black
multi_line_output &lt;span class="o"&gt;=&lt;/span&gt; 3
include_trailing_comma &lt;span class="o"&gt;=&lt;/span&gt; True
force_grid_wrap &lt;span class="o"&gt;=&lt;/span&gt; 0
use_parentheses &lt;span class="o"&gt;=&lt;/span&gt; True
line_length &lt;span class="o"&gt;=&lt;/span&gt; 88
skip_gitignore &lt;span class="o"&gt;=&lt;/span&gt; True
ensure_newline_before_comments &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5. Copy everything below and append it to your &lt;code&gt;.pre-commit-config.yaml&lt;/code&gt; file, but change the repository mappings of each hook to reflect the correct version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;-   repo: https://github.com/PyCQA/pylint
    rev: v2.12.2
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: pylint
-   repo: https://github.com/psf/black
    rev: 21.12b0
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: black
-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.930
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: mypy
-   repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
    - &lt;span class="nb"&gt;id&lt;/span&gt;: isort
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6. Copy everything from a &lt;a href="https://www.toptal.com/developers/gitignore/api/python,pycharm" rel="noopener noreferrer"&gt;template&lt;/a&gt; and paste it into a &lt;code&gt;.gitignore&lt;/code&gt; file within the project's root directory.&lt;/p&gt;

&lt;p&gt;7. Copy everything from a &lt;a href="https://github.com/alexkaratarakis/gitattributes/blob/master/Python.gitattributes" rel="noopener noreferrer"&gt;template&lt;/a&gt; and paste it into a &lt;code&gt;.gitattributes&lt;/code&gt; file within the project's root directory.&lt;/p&gt;

&lt;p&gt;8. Open a terminal and type the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git init
&lt;span class="nv"&gt;$ &lt;/span&gt;pre-commit autoupdate
&lt;span class="nv"&gt;$ &lt;/span&gt;pre-commit run &lt;span class="nt"&gt;--all-files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to top&lt;/p&gt;

&lt;h2&gt;
  
  
  PyCharm &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;PyCharm Community Edition is a free, open-source, cross-platform IDE designed for pure Python development. Download, run the &lt;a href="https://www.jetbrains.com/pycharm/download/#section=windows" rel="noopener noreferrer"&gt;Standalone Installer&lt;/a&gt;, and follow the installation wizard steps. Refer to the &lt;a href="https://www.jetbrains.com/help/pycharm/installation-guide.html" rel="noopener noreferrer"&gt;Installation guide&lt;/a&gt; for more information.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Open projects &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. To open your project from disk, do one of the following:&lt;br&gt;
  On the Welcome Screen, click the &lt;em&gt;Open&lt;/em&gt; button.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;From the main menu, select &lt;em&gt;File | Open&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;2. In the "&lt;em&gt;Open File or Project&lt;/em&gt;" dialog that opens, find location of the project directory.&lt;/p&gt;

&lt;p&gt;3. Click OK.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Configure Python interpreter &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the project settings.&lt;/p&gt;

&lt;p&gt;2. Go to &lt;em&gt;Project  | Python Interpreter&lt;/em&gt;. Then click on the cog icon and select &lt;em&gt;Add&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;3. In the left-hand pane of the &lt;em&gt;"Add Python Interpreter"&lt;/em&gt; dialog, select &lt;em&gt;Poetry Environment&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;4. Select the &lt;em&gt;Existing environment&lt;/em&gt; option. Expand the Interpreter list and select any of the existing Poetry environments. Alternatively, find an interpreter and specify a path to it.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Default project directory &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the project settings.&lt;/p&gt;

&lt;p&gt;2. Go to &lt;em&gt;Apearance &amp;amp; Behaviour | System Settings&lt;/em&gt;. Then click on the folder icon to browse and select the default project folder for all projects (e.g., &lt;code&gt;C:\repos&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;3.\ Click the &lt;em&gt;OK&lt;/em&gt; button.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Suggested plugins &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Pycharm offers support for plugins to extend the core functionality of PyCharm and improve productivity. The following is only a short list of noteworthy community rated plugins, browse the Jet Brains Marketplace for more.&lt;/p&gt;
&lt;h4&gt;
  
  
  Free plugins
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/11084-pylint" rel="noopener noreferrer"&gt;Pylint&lt;/a&gt; provides both real-time and on-demand scanning of Python files with Pylint from within the PyCharm IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/7177-file-watchers" rel="noopener noreferrer"&gt;File Watchers&lt;/a&gt; allows the executing of tasks triggered by file modifications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/10080-rainbow-brackets" rel="noopener noreferrer"&gt;Rainbow Brackets&lt;/a&gt; colors nested parentheses, brackets or braces in your code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/7086-acejump" rel="noopener noreferrer"&gt;AceJump&lt;/a&gt; allows you to quickly navigate the caret to any position visible in the editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/2162-string-manipulation" rel="noopener noreferrer"&gt;String Manipulation&lt;/a&gt; provides case switching, sorting, filtering, incrementing, aligning to columns, grepping, escaping, encoding, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/7448-zero-width-characters-locator" rel="noopener noreferrer"&gt;Zero Width Characters Locator&lt;/a&gt; adds an inspection that prevents some hard to find bugs related to invisible zero width characters in source code and resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/12175-grazie" rel="noopener noreferrer"&gt;Grazie&lt;/a&gt; provides intelligent spelling and grammar checks for text that you write in the IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/8554-ide-features-trainer" rel="noopener noreferrer"&gt;IDE Features Trainer&lt;/a&gt; helps you learn basic shortcuts and essential features interactively - right inside the IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/9792-key-promoter-x" rel="noopener noreferrer"&gt;Key Promoter X&lt;/a&gt; helps you to learn essential shortcuts while you are working.&lt;/p&gt;


&lt;h4&gt;
  
  
  Freemium plugins
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/15148-kite-ai-code-autocomplete-python-java-js-go-html-php-c---more" rel="noopener noreferrer"&gt;Kite&lt;/a&gt; is an AI-powered coding assistant featuring code completion snippets, advanced function signatures, and instant documentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/12798-tabnine-ai-code-completion-js-java-python-ts-rust-go-php--more" rel="noopener noreferrer"&gt;Tabnine&lt;/a&gt; is an AI coding assistant featuring code completion, AI-powered code completion, AI copilot, AI code snippets, code suggestion, code prediction, code hinting, or content assist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://plugins.jetbrains.com/plugin/7425-wakatime" rel="noopener noreferrer"&gt;WakaTime&lt;/a&gt; provides metrics, insights, and time tracking automatically generated from your programming activity.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  Install plugins &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;1. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the IDE settings.&lt;/p&gt;

&lt;p&gt;2. Go to &lt;em&gt;Plugins&lt;/em&gt;. Then click on the &lt;em&gt;Marketplace&lt;/em&gt; tab to browse and install plugins.&lt;/p&gt;

&lt;p&gt;3. Find the plugin in the &lt;em&gt;Marketplace&lt;/em&gt; and click &lt;em&gt;install&lt;/em&gt;.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h3&gt;
  
  
  IDE integration &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Black
&lt;/h4&gt;

&lt;p&gt;1. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the IDE settings.&lt;/p&gt;

&lt;p&gt;2. Go to &lt;em&gt;Tools&lt;/em&gt; | &lt;em&gt;External Tools&lt;/em&gt;. Then press &lt;em&gt;Alt + Insert&lt;/em&gt; keyboard combination, to add a new tool.&lt;/p&gt;

&lt;p&gt;3. Add a new external tool with the following values:&lt;br&gt;
   &lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;Black&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Description:&lt;/strong&gt; &lt;code&gt;Black is the uncompromising Python code formatter.&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Program:&lt;/strong&gt; &lt;code&gt;$PyInterpreterDirectory$/black&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Arguments:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt; &lt;br&gt;
   &lt;strong&gt;Working directory:&lt;/strong&gt; &lt;code&gt;$ProjectFileDir$&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;4. Click OK button.&lt;/p&gt;

&lt;p&gt;5. Format the currently opened file by selecting &lt;em&gt;Tools | External Tools | Black&lt;/em&gt; from the menu.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;1. Make sure you have the &lt;a href="https://plugins.jetbrains.com/plugin/7177-file-watchers" rel="noopener noreferrer"&gt;File Watchers&lt;/a&gt; plugin installed.&lt;/p&gt;

&lt;p&gt;2. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the IDE settings.&lt;/p&gt;

&lt;p&gt;3. Go to &lt;em&gt;Tools | File Watchers&lt;/em&gt;. Then press &lt;em&gt;Alt + Insert&lt;/em&gt; keyboard combination, to add a new watcher.&lt;/p&gt;

&lt;p&gt;4. Add a new watcher with the following values:&lt;br&gt;
   &lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;Black&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;File type:&lt;/strong&gt; &lt;code&gt;Python&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Scope:&lt;/strong&gt; &lt;code&gt;Project Files&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Program:&lt;/strong&gt; &lt;code&gt;$PyInterpreterDirectory$/black&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Arguments:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Output paths to refresh:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Working directory:&lt;/strong&gt; &lt;code&gt;$ProjectFileDir$&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5. In advanced Options&lt;br&gt;
   Uncheck "Auto-save edited files to trigger the watcher"&lt;br&gt;
   Uncheck "Trigger the watcher on external changes"&lt;/p&gt;

&lt;p&gt;6. Click OK button.&lt;/p&gt;


&lt;h4&gt;
  
  
  mypy
&lt;/h4&gt;

&lt;p&gt;1. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the IDE settings.&lt;/p&gt;

&lt;p&gt;2. Go to &lt;em&gt;Tools&lt;/em&gt; | &lt;em&gt;External Tools&lt;/em&gt;. Then press &lt;em&gt;Alt + Insert&lt;/em&gt; keyboard combination, to add a new tool.&lt;/p&gt;

&lt;p&gt;3. Add a new external tool with the following values:&lt;br&gt;
   &lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;mypy&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Description:&lt;/strong&gt; &lt;code&gt;mypy is the de facto static type checker for Python.&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Program:&lt;/strong&gt; &lt;code&gt;$PyInterpreterDirectory$/mypy&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Arguments:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt; &lt;br&gt;
   &lt;strong&gt;Working directory:&lt;/strong&gt; &lt;code&gt;$ProjectFileDir$&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;4. Click OK button.&lt;/p&gt;

&lt;p&gt;5. Format the currently opened file by selecting &lt;em&gt;Tools | External Tools | Black&lt;/em&gt; from the menu.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;1. Make sure you have the &lt;a href="https://plugins.jetbrains.com/plugin/7177-file-watchers" rel="noopener noreferrer"&gt;File Watchers&lt;/a&gt; plugin installed.&lt;/p&gt;

&lt;p&gt;2. Press &lt;em&gt;Crtl + Alt + S&lt;/em&gt; keyboard combination, to open the IDE settings.&lt;/p&gt;

&lt;p&gt;3. Go to &lt;em&gt;Tools | File Watchers&lt;/em&gt;. Then press &lt;em&gt;Alt + Insert&lt;/em&gt; keyboard combination, to add a new watcher.&lt;/p&gt;

&lt;p&gt;4. Add a new watcher with the following values:&lt;br&gt;
   &lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;mypy&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;File type:&lt;/strong&gt; &lt;code&gt;Python&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Scope:&lt;/strong&gt; &lt;code&gt;Project Files&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Program:&lt;/strong&gt; &lt;code&gt;$PyInterpreterDirectory$/mypy&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Arguments:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Output paths to refresh:&lt;/strong&gt; &lt;code&gt;$FilePath$&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;Working directory:&lt;/strong&gt; &lt;code&gt;$ProjectFileDir$&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5. In advanced Options&lt;br&gt;
   Uncheck "Auto-save edited files to trigger the watcher"&lt;br&gt;
   Uncheck "Trigger the watcher on external changes"&lt;/p&gt;

&lt;p&gt;6. Click OK button.&lt;/p&gt;


&lt;h4&gt;
  
  
  isort
&lt;/h4&gt;

&lt;p&gt;In short, there is no viable integration option available that I am aware of at the moment. The available isort plugin is outdated, and there are issues when trying to use either External Tools or the File Watchers plugin for this purpose.&lt;br&gt;
back to top&lt;/p&gt;
&lt;h2&gt;
  
  
  Known issues &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;1. At the time of writing, I encountered an &lt;a href="https://github.com/python-poetry/poetry/issues/4163" rel="noopener noreferrer"&gt;issue&lt;/a&gt; with Poetry's caching. When installing Poetry or dependencies you may encounter the following error: &lt;em&gt;"ValueError, some whl file in the cache does not exist."&lt;/em&gt;. There are currently two accepted community workarounds:&lt;br&gt;
Simply delete the &lt;code&gt;AppData\Local\pypoetry\Cache\artifacts&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;Export a &lt;code&gt;requirements.txt&lt;/code&gt; file with Poetry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;poetry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-f&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--without-hashes&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the project's dependencies with pip instead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. If you installed the latest Git for Windows release, Git should automatically detect the existence of OpenSSH in Windows and should properly configure and associate with OpenSSH. This information is mostly here for completeness and in case someone does experience issues (referring to step 6.4 of Git). &lt;/p&gt;

&lt;p&gt;The workaround for this is to change your Git global configuration to use the OpenSSH executable. Refer to the &lt;a href="https://git-scm.com/docs/git" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt; for more information. Run the following command in Windows PowerShell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;core.sshCommand&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"'C:\Windows\System32\OpenSSH\ssh.exe'"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;Append the following to the &lt;code&gt;[core]&lt;/code&gt; section in your &lt;code&gt;~/.config&lt;/code&gt; file. Refer to the &lt;a href="https://git-scm.com/docs/git-config" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;core]
    sshCommand &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="se"&gt;\"&lt;/span&gt;C:&lt;span class="se"&gt;\\&lt;/span&gt;Windows&lt;span class="se"&gt;\\&lt;/span&gt;System32&lt;span class="se"&gt;\\&lt;/span&gt;OpenSSH&lt;span class="se"&gt;\\&lt;/span&gt;ssh.exe&lt;span class="se"&gt;\"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;If you still experience issues, you can override the Git auto-detection whether commands refer to OpenSSH by setting the &lt;code&gt;GIT_SSH&lt;/code&gt; environment variable. Refer to the &lt;a href="https://git-scm.com/docs/git" rel="noopener noreferrer"&gt;man pages for Git&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="nx"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"GIT_SSH"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Get-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;.Source)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.EnvironmentVariableTarget&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to top&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How do I manage SSH keys stored in the ssh-agent (Portable OpenSSH)?</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Thu, 18 Nov 2021 12:13:42 +0000</pubDate>
      <link>https://forem.com/blikoor/how-do-you-manage-ssh-keys-stored-in-the-ssh-agent-portable-openssh-4766</link>
      <guid>https://forem.com/blikoor/how-do-you-manage-ssh-keys-stored-in-the-ssh-agent-portable-openssh-4766</guid>
      <description>&lt;p&gt;• Windows 10 v20H2  • Git v2.33.0.windows.2  • &lt;a href="https://github.com/PowerShell/openssh-portable"&gt;Portable OpenSSH&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm at my wit's end trying to figure out how to manage SSH keys stored by the ssh-agent. I expect to be able to list the keys and delete all or individual keys as needed. The &lt;a href="https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview"&gt;Microsoft Docs&lt;/a&gt; doesn't give any indication of how to do this, but at least point you to the &lt;a href="https://www.openssh.com/manual.html"&gt;OpenSSH Manual&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;However, the &lt;strong&gt;commands do not work&lt;/strong&gt;!&lt;br&gt;
I have searched for solutions on the internet, but I couldn't find any. I'll explain the issue in more detail with the following steps:&lt;/p&gt;

&lt;p&gt;I Verified that the path for the ssh-agent used by Git is properly configured and associated with Portable OpenSSH in Windows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Get-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Select-Object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Source&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Source&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;------&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;C:\Windows\System32\OpenSSH\ssh.exe&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1. Test the SSH connection to confirm that SSH authentication is working.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-T&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;github.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'C:\Users\Blikoor/.ssh/id_ed25519'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Hi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blikoor&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;You&lt;/span&gt;&lt;span class="s1"&gt;'ve successfully authenticated, but GitHub does not provide shell access.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2. To lists the public keys of all identities currently managed by the ssh-agent. I expected a list containing the Ed25519 key(s) stored by the agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-L&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;no&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;identities.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. To delete a specific or list of identities from the ssh-agent. I expected the agent to remove the private key corresponding to the specified public key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="nx"&gt;\.ssh\id_ed25519.pub&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Could&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;identity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Users\Blikoor\.ssh\id_ed25519.pub"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;refused&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. To delete all identities from the ssh-agent. I expected the agent to remove all the private keys, but even though it seems successful, the SSH authentication test in the next step disproof this assumption.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh-add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-D&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;All&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;identities&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;removed.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5. Test the SSH connection again after deleting all keys. I expected that the test will fail, yet the second test is successful as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-T&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;github.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'C:\Users\Blikoor/.ssh/id_ed25519'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Hi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blikoor&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;You&lt;/span&gt;&lt;span class="s1"&gt;'ve successfully authenticated, but GitHub does not provide shell access.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>github</category>
      <category>help</category>
      <category>openssh</category>
    </item>
    <item>
      <title>Customize Git Bash shell</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Sun, 31 Oct 2021 16:27:24 +0000</pubDate>
      <link>https://forem.com/blikoor/customize-git-bash-shell-498l</link>
      <guid>https://forem.com/blikoor/customize-git-bash-shell-498l</guid>
      <description>&lt;p&gt;Due to the need to maintain backward compatibility, newer features of Bash are rarely enabled by default. MinGW64 (Minimalist GNU for Windows x64) has to be configured to take full advantage of these features. Improve your productivity with several simple tweaks that can enhance Bash out-of-the-box without using external stuff. I will assume that Git for Windows and optionally also Windows Terminal are already installed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Customize Startup Files
&lt;/h2&gt;

&lt;p&gt;The Git bash shell is invoked as an interactive login shell for Git-only authentication access. Bash uses a few startup files to configure the shell environment for users. It will source files like &lt;code&gt;~/.bash_profile&lt;/code&gt;, &lt;code&gt;~/.bash_login&lt;/code&gt;, and &lt;code&gt;~/.profile&lt;/code&gt; in the order given. The first readable file that exists is sourced.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bash Profile
&lt;/h3&gt;

&lt;p&gt;1. Create a &lt;code&gt;~/.bash_profile&lt;/code&gt; file. The &lt;code&gt;.bash_profile&lt;/code&gt; contains commands for setting the shell's environment variables. A &lt;code&gt;~/.bash_profile&lt;/code&gt; can be used instead of &lt;code&gt;~/.profile&lt;/code&gt; but is read by Bash only. Since the shell is interactive, the &lt;code&gt;~/.bashrc&lt;/code&gt; file is not sourced. Refer to the &lt;a href="https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html" rel="noopener noreferrer"&gt;Bash Manual&lt;/a&gt; for more information. Copy everything below into your own file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Source the ~/.bashrc file if it exists&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.bashrc &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;then&lt;/span&gt;
    &lt;span class="nb"&gt;.&lt;/span&gt; ~/.bashrc
&lt;span class="k"&gt;fi&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Bash shell Script
&lt;/h3&gt;

&lt;p&gt;2. Create a &lt;code&gt;~/.bashrc&lt;/code&gt; file. The &lt;code&gt;.bashrc&lt;/code&gt; file contains commands that are specific to the Bash shell. It is the best place for aliases and bash-related functions. Copy everything below into your own file.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Git aliases&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git status -sb'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gcc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git checkout'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gcm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git checkout master'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gaa&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git add --all'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git commit -m $2'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;push&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git push'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gpo&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git push origin'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;pull&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git pull'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;clone&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git clone'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;stash&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git stash'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;pop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git stash pop'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;ga&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git add'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gb&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git branch'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&amp;lt;%an&amp;gt;%Creset' --abbrev-commit"&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git merge'&lt;/span&gt;

&lt;span class="c"&gt;# Bash aliases&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; .&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd .'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ..&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ..'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ...&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ....&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../../'&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; .....&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd ../../../../'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;bashclear&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'echo "" &amp;gt; ~/.bash_history'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;cls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'clear'&lt;/span&gt;
&lt;span class="nb"&gt;alias ls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -F --color=auto --show-control-chars'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;ll&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -l'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;ll.&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -la'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;lls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -la --sort=size'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;llt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -la --sort=time'&lt;/span&gt;
&lt;span class="nb"&gt;alias rm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'rm -iv'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;work&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'cd /c/repos'&lt;/span&gt;

&lt;span class="c"&gt;# Bash shell settings&lt;/span&gt;
&lt;span class="c"&gt;# Typing a directory name just by itself will automatically change into that directory.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; autocd

&lt;span class="c"&gt;# Automatically fix directory name typos when changing directory.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; cdspell

&lt;span class="c"&gt;# Automatically expand directory globs and fix directory name typos whilst completing. &lt;/span&gt;
&lt;span class="c"&gt;# Note, this works in conjuction with the cdspell option listed above.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; direxpand dirspell

&lt;span class="c"&gt;# Enable the ** globstar recursive pattern in file and directory expansions.&lt;/span&gt;
&lt;span class="c"&gt;# For example, ls **/*.txt will list all text files in the current directory hierarchy.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; globstar

&lt;span class="c"&gt;# Ignore lines which begin with a &amp;lt;space&amp;gt; and match previous entries.&lt;/span&gt;
&lt;span class="c"&gt;# Erase duplicate entries in history file.&lt;/span&gt;
&lt;span class="nv"&gt;HISTCONTROL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ignoreboth:erasedups

&lt;span class="c"&gt;# Ignore saving short- and other listed commands to the history file.&lt;/span&gt;
&lt;span class="nv"&gt;HISTIGNORE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;?:??:history

&lt;span class="c"&gt;# The maximum number of lines in the history file.&lt;/span&gt;
&lt;span class="nv"&gt;HISTFILESIZE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;99999

&lt;span class="c"&gt;# The number of entries to save in the history file.&lt;/span&gt;
&lt;span class="nv"&gt;HISTSIZE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;99999

&lt;span class="c"&gt;# Set Bash to save each command to history, right after it has been executed.&lt;/span&gt;
&lt;span class="nv"&gt;PROMPT_COMMAND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'history -a'&lt;/span&gt;

&lt;span class="c"&gt;# Save multi-line commands in one history entry.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; cmdhist

&lt;span class="c"&gt;# Append commands to the history file, instead of overwriting it.&lt;/span&gt;
&lt;span class="c"&gt;# History substitution are not immediately passed to the shell parser.&lt;/span&gt;
&lt;span class="nb"&gt;shopt&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; histappend histverify


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Git Bash Prompt
&lt;/h3&gt;

&lt;p&gt;The Git Bash prompt is set by a shell script called &lt;code&gt;git-prompt.sh&lt;/code&gt; and can be found in the &lt;code&gt;c/Program\ Files/Git/etc/profile.d&lt;/code&gt; directory. Notice that in lines 8-10, a custom &lt;code&gt;~/.config/git/git-prompt.sh&lt;/code&gt; file will be sourced, if it exists. I believe that this is the recommended method to override the default settings.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# lines omitted&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.config/git/git-prompt.sh
&lt;span class="k"&gt;then&lt;/span&gt;
    &lt;span class="nb"&gt;.&lt;/span&gt; ~/.config/git/git-prompt.sh
&lt;span class="k"&gt;else&lt;/span&gt;
    &lt;span class="c"&gt;# lines omitted&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="c"&gt;# lines omitted&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;3. Create a &lt;code&gt;~/.config/git/git-prompt.sh&lt;/code&gt; file. The &lt;code&gt;git-prompt.sh&lt;/code&gt; file contains commands for setting the title of the Git Bash terminal and the Bash prompt string. Copy everything below into your own file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Custom prompt settings&lt;/span&gt;
&lt;span class="nv"&gt;PROMPT_DIRTRIM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4                         &lt;span class="c"&gt;# Shorten deep paths in the prompt&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\[\033]0;Git | Bash v\v | \W\007\]'&lt;/span&gt; &lt;span class="c"&gt;# set window title&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\n'&lt;/span&gt;                           &lt;span class="c"&gt;# new line&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\[\033[30;45m\] [\A] '&lt;/span&gt;        &lt;span class="c"&gt;# black text, magenta, 24h time&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\[\033[30;42m\] \u '&lt;/span&gt;          &lt;span class="c"&gt;# black text, green, user&lt;/span&gt;
&lt;span class="c"&gt;#PS1="$PS1"'\[\033[30;42m\]@\h '          # black text, green, @host&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\[\033[30;43m\] \w '&lt;/span&gt;          &lt;span class="c"&gt;# black text, yellow, working director&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$WINELOADERNOEXEC&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nv"&gt;GIT_EXEC_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git &lt;span class="nt"&gt;--exec-path&lt;/span&gt; 2&amp;gt;/dev/null&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nv"&gt;COMPLETION_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GIT_EXEC_PATH&lt;/span&gt;&lt;span class="p"&gt;%/libexec/git-core&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nv"&gt;COMPLETION_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;COMPLETION_PATH&lt;/span&gt;&lt;span class="p"&gt;%/lib/git-core&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nv"&gt;COMPLETION_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$COMPLETION_PATH&lt;/span&gt;&lt;span class="s2"&gt;/share/git/completion"&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$COMPLETION_PATH&lt;/span&gt;&lt;span class="s2"&gt;/git-prompt.sh"&lt;/span&gt;
    &lt;span class="k"&gt;then&lt;/span&gt;
        &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$COMPLETION_PATH&lt;/span&gt;&lt;span class="s2"&gt;/git-completion.bash"&lt;/span&gt;
        &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$COMPLETION_PATH&lt;/span&gt;&lt;span class="s2"&gt;/git-prompt.sh"&lt;/span&gt;
        &lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\[\033[97;46m\]'&lt;/span&gt;  &lt;span class="c"&gt;# white text, cyan&lt;/span&gt;
        &lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'`__git_ps1`'&lt;/span&gt;      &lt;span class="c"&gt;# bash function&lt;/span&gt;
    &lt;span class="k"&gt;fi
fi
&lt;/span&gt;&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\[\033[0m\]'&lt;/span&gt;        &lt;span class="c"&gt;# change color&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'\n'&lt;/span&gt;                 &lt;span class="c"&gt;# new line&lt;/span&gt;
&lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PS1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s1"&gt;'$ '&lt;/span&gt;                 &lt;span class="c"&gt;# prompt: always $&lt;/span&gt;

&lt;span class="c"&gt;# Git status options&lt;/span&gt;
&lt;span class="c"&gt;# Shows * or + for unstaged and staged changes, respectively.&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GIT_PS1_SHOWSTASHSTATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# shows $ if there are any stashes.&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GIT_PS1_SHOWDIRTYSTATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# Shows % if there are any untracked files.&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GIT_PS1_SHOWUNTRACKEDFILES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# shows &amp;lt;, &amp;gt;, &amp;lt;&amp;gt;, or = when your branch is behind, ahead, diverged from,&lt;/span&gt;
&lt;span class="c"&gt;# or in sync with the upstream branch, respectively.&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GIT_PS1_SHOWUPSTREAM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"auto"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  User Configuration
&lt;/h3&gt;

&lt;p&gt;4. Create a &lt;code&gt;~/.inputrc&lt;/code&gt; file. This file contains commands to configure command history, directory display, and keyboard bindings using the built-in GNU Readline library. Refer to the &lt;a href="https://www.gnu.org/software/bash/manual/html_node/Readline-Interaction.html" rel="noopener noreferrer"&gt;Bash Manual&lt;/a&gt;, and &lt;a href="https://tiswww.case.edu/php/chet/readline/rltop.html" rel="noopener noreferrer"&gt;Readline Documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Disable beeps &amp;amp; bells, and do not display control characters.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;bell-style none
&lt;span class="nb"&gt;set &lt;/span&gt;echo-control-characters off

&lt;span class="c"&gt;# The TAB key cycles forward through the completion choices.&lt;/span&gt;
&lt;span class="c"&gt;# Press an arrow key, such as right-arrow, to choose a selection.&lt;/span&gt;
TAB: menu-complete

&lt;span class="c"&gt;# The Shift-TAB key cycles backward through the completion choices.&lt;/span&gt;
&lt;span class="c"&gt;# Like TAB, press an arrow key, such as right-arrow, to choose a selection.&lt;/span&gt;
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[Z"&lt;/span&gt;: menu-complete-backward

&lt;span class="c"&gt;# The first TAB key press will display a list that match the given prefix.&lt;/span&gt;
&lt;span class="c"&gt;# The next TAB key press will start cycling through the available choices.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;menu-complete-display-prefix on

&lt;span class="c"&gt;# Display completion matches upon the first press of the TAB key.&lt;/span&gt;
&lt;span class="c"&gt;#set show-all-if-ambiguous on&lt;/span&gt;

&lt;span class="c"&gt;#Enable colors when completing filenames and directories.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;colored-stats on

&lt;span class="c"&gt;# Completion matches of multiple items highlight the matching prefix in color.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;colored-completion-prefix on

&lt;span class="c"&gt;# Ignore case when completing.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;completion-ignore-case on

&lt;span class="c"&gt;# Treat hypens and underscores as equivalent when completing.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;completion-map-case on

&lt;span class="c"&gt;# Append the / character to the end of symlinked directories when completing.&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;mark-symlinked-directories on

&lt;span class="c"&gt;# Enable incremental history navigation with the UP and DOWN arrow keys.&lt;/span&gt;
&lt;span class="c"&gt;# This will use the already typed text as a required prefix.&lt;/span&gt;
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[A"&lt;/span&gt;: history-search-backward
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;[B"&lt;/span&gt;: history-search-forward


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The Readline library also provides several useful shortcuts. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Keyboard shortcut&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Control-A&lt;/td&gt;
&lt;td&gt;Go to beginning of line.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-E&lt;/td&gt;
&lt;td&gt;Go to the end of the line.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alt-B&lt;/td&gt;
&lt;td&gt;Go back one word.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alt-F&lt;/td&gt;
&lt;td&gt;Go forward on word.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alt-Backspace&lt;/td&gt;
&lt;td&gt;Delete backward one word.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alt-D&lt;/td&gt;
&lt;td&gt;Delete forward one word.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-R&lt;/td&gt;
&lt;td&gt;Search back through history.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-R&lt;/td&gt;
&lt;td&gt;Cycle backward through history.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-Shift-R&lt;/td&gt;
&lt;td&gt;Cycle forward through history.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alt-.&lt;/td&gt;
&lt;td&gt;Append an argument of the previous command.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Finished Result
&lt;/h3&gt;

&lt;p&gt;5. After the customization is done, restart the terminal or open a new Git Bash tab in Windows Terminal. Your Git Bash should look similar to the result below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnklsu0l3xh1nif49hsgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnklsu0l3xh1nif49hsgf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bash Utilities
&lt;/h2&gt;

&lt;p&gt;Some Bash utilities are also included with Git for Windows and may be used to enhance your Git experience if the default behavior is not desired. These utilities will need to be configured in each independent development environment. Refer to the &lt;a href="https://git-scm.com/book/cs/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash" rel="noopener noreferrer"&gt;Pro Git Book&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;git-completion&lt;/em&gt; and &lt;em&gt;git-prompt&lt;/em&gt; scripts can be found in the following directory. &lt;code&gt;/c/Program\ Files/Git/mingw64/share/git/completion/&lt;/code&gt;  Copy the &lt;code&gt;git-completion.bash&lt;/code&gt; and &lt;code&gt;git-prompt.sh&lt;/code&gt; to your home directory.&lt;/p&gt;

&lt;p&gt;To use the scripts append the following lines to the &lt;code&gt;~/.bashrc&lt;/code&gt; file. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Enable tab completion for Git commands&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.git-completion.bash
&lt;span class="c"&gt;# Change bash prompt to display current Git branch and status&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.git-prompt.sh


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>bash</category>
      <category>git</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Where to start</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Wed, 08 Sep 2021 06:08:48 +0000</pubDate>
      <link>https://forem.com/blikoor/where-to-start-33g0</link>
      <guid>https://forem.com/blikoor/where-to-start-33g0</guid>
      <description>&lt;p&gt;My programming journey began with studying BCom Informatics (Information Systems) back in seemingly the dark ages of studying computing, where you did not have much choice in your field of study. I was mainly interested in game development, but my first introduction to programming was with COBOL and C++. These days academic institutions provide study programs geared towards game development.&lt;/p&gt;

&lt;p&gt;As a new developer, you may hear that &lt;em&gt;"C++ is the language that the pros use."&lt;/em&gt;, and therefore you should use it too. But do not start with C++ unless you're an experienced developer. Because sometimes using what the pros use isn't the right thing to do. The first language you learn shouldn't have a steep learning curve. With more knowledge and experience under your belt, you'll be able to transition to whatever the pros use. You might also feel tempted to jump straight in a game engine, but you're going to get stuck often and hit frustrating roadblocks. You first need to learn the basics of programming to build a solid foundation.&lt;/p&gt;

&lt;p&gt;I recommend starting with &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt;.  Learn to make games with any of the dominant Python game libraries, &lt;a href="https://www.pygame.org/"&gt;Pygame&lt;/a&gt;, &lt;a href="http://cocos2d.org/#cocos2dpy"&gt;Cocos2D&lt;/a&gt;, &lt;a href="http://pyglet.org/"&gt;PYGLET&lt;/a&gt;, &lt;a href="https://www.panda3d.org/"&gt;Panda3D&lt;/a&gt;, or &lt;a href="https://www.ogre3d.org/"&gt;OGRE&lt;/a&gt;. Python is easy to learn, and there's a lot of resources available. It is also the most commonly used language for scripting, automation, and developing plugins for graphic applications. Move to the &lt;a href="https://godotengine.org/"&gt;Godot Engine&lt;/a&gt; once you have a good understanding of Python, then GDScript will make a lot more sense. &lt;/p&gt;

&lt;p&gt;My second recommendation would be to start with C# and learn to make games with &lt;a href="https://www.monogame.net/"&gt;MonoGame&lt;/a&gt;. C# is a modern, easy-to-learn derivative of C++ that has a higher learning curve than Python.  Again, once you have a good understanding of C#, you'll have an easy transition to &lt;a href="https://unity.com/"&gt;Unity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Because of its multidisciplinary nature, game development can feel overwhelming at first. To make games alone or as part of a small team, you'll need to learn game design and programming. That's a lot to tackle all at once! Be patient and enjoy the journey. Start small, focus on code and design separately, honing each skill you need on its own.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My GameDev Journey</title>
      <dc:creator>Blikoor</dc:creator>
      <pubDate>Mon, 06 Sep 2021 07:10:05 +0000</pubDate>
      <link>https://forem.com/blikoor/my-gamedev-journey-2k9f</link>
      <guid>https://forem.com/blikoor/my-gamedev-journey-2k9f</guid>
      <description>&lt;p&gt;Esteemed friends, welcome to my dev blog. A direct English translation for my pseudo name would be "Tinear", it hints towards an old Afrikaans proverb: &lt;em&gt;'n Blikoor wees — So genoem omdat Vrystaters dan kwansuis dom sou wees omdat hulle nie met blikore kan hoor nie.&lt;/em&gt; In other words, just hinting towards the province of origin. 😜&lt;/p&gt;

&lt;p&gt;I have been learning to program for a few years now, but I have never really developed anything. Studying several programming languages in courses over the years and following along with tutorials, I still find myself in &lt;em&gt;Tutorial Purgatory&lt;/em&gt;. But although I still feel like a beginner, I like to think that I am a game developer by heart. 😏&lt;/p&gt;

&lt;p&gt;The general consensus seems to be that there are numerous convincing reasons to blog about your journey, for new developers and professionals alike. I look forward to assisting other developers in good faith and hopefully escape Tutorial Purgatory myself in the process. Admittedly, it would be equally great to learn from other community members as well. 😎&lt;/p&gt;

</description>
      <category>writing</category>
      <category>gamedev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
