about
Bits Hello Python
09/04/2023
0
Bits: Hello Python
code, output, and build for Python on Windows, macOS, and Linux
Synopsis:
This page demonstrates use of Visual Studio Code to build and execute a simple Python "Hello World" program, showing its build process and launch file. The purpose is to show how to get started quickly.- Companion pages for C++, Rust, C#, and JavaScript are accessible from the links in the fixed right panel.
- Navigation through example levels for the same language is effected with the "Next" and "Prev" buttons in the menus or by using the "N" and "P" keys.
- The links in the left panel point to major sections of this page and all of the Bits pages for Python.
Note:
Most page links in this site refer to specific points in a target page, usually the top. For all of the code bits here, links return to the last scroll position. This supports quickly moving between similar code for each of the languages covered. That maintains context for comparisons.
Most page links in this site refer to specific points in a target page, usually the top. For all of the code bits here, links return to the last scroll position. This supports quickly moving between similar code for each of the languages covered. That maintains context for comparisons.
Source Code
# HelloWorld::Py_Hello.py
print("\n Hello Python World\n")
Output
C:\github\JimFawcett\Bits\Python\Py_Hello
> python Py_Hello.py
Hello Python World
C:\github\JimFawcett\Bits\Python\Py_Hello
>
Build
Create Project
C:\github\JimFawcett\test
> mkdir Python_Hello
Directory: C:\github\JimFawcett\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2/24/2023 3:02 PM Python_Hello
C:\github\JimFawcett\test
> cd Python_Hello
C:\github\JimFawcett\test\Python_Hello
> New-Item -path "." -type file -name "Py_Hello.py"
Directory: C:\github\JimFawcett\test\Python_Hello
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2/24/2023 3:03 PM 0 Py_Hello.py
C:\github\JimFawcett\test\Python_Hello
>
2.0 VS Code View
3.0 References
Reference | Description |
---|---|
Python Tutorial - docs.python.org | E-book with sixteen chapters covering most of intermediate Python |
Python Tutorial - pythontutorial.net | Basic syntax and operations |
Python Introduction - w3schools | Interactive examples - good coverage |
Bits Tooling | Tool chains, VS Code |