
Please support if you like my work by payment through upi: sinhamit@icici or payment by bank
account name: Amit Kumar Sinha,
account number: 2646728782
IFSC code: KKBK0005660
SWIFT: KKBKINBB
Project Folder Setup in Python in Category: Python by amit
🕙 Posted on 2023-03-30 at 07:29:31 Read in Hindi ...
Test and verify whether Python is working ?
Open you command line tool/interface (CLI) from Start button. CLI is the CONSOLE where you can RUN any program directly. (This CONSOLE is also integrated in web-browser with some limitations, where you can run JavaScript CODE directly.)
Since Python is added to system Environment Variable PATH, you do not have to locate its original file. Just type python --version or py --version to see the result. If no error is displayed, Python is installed properly.
Similarly, type pip --version to see the result. Following texts in black background and white color, are illustration / example to verify whether Python and its modules installed by default are working. When you type python or Python or py in the CLI, the python program >>> starts and you can quit/exit by typing exit() or quit() function commands.
Caution: Python commands are actually python built-in functions, whereas Command Line Interface has its own command, for example, cd (Change Directory), md folderName (Make Directory folderName), dir (View files and folder in Current Directory), exit (Exit/quit the CLI tool), etc. are MS-DOS (MicroSoft Disk Operating System) commands. Similarly, Linux and Mac OS have their own Command Line Interface, and they have their own specific commands, to locate, operate, run programs.
C:\Users\
Python 3.10.9
C:\Users\
Python 3.10.9
C:\Users\
pip 22.3.1 from C:\python\lib\
C:\Users\
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
hello world
>>> quit()
C:\Users\
If there is any error shown in the command line interface, it may be because python.exe and scripts\

Create and Run Python file in VSCode Editor
1. If you don't know know to set up PROJECT FOLDER, create files and other folders inside the PROJECT FOLDER, you should visit write HTML code in VSCode software page.

2. Create a new folder, namely, python2023 within your PROJECT FOLDER, that is, C:\xampp\

3. Create a new file, namely, new.py in the newly created folder, python2023 as shown in image above. This will help you to differentiate python files with other programming / scripting language codes. All python codes are saved with .py extension.
4. Write some code, in the newly created file, namely, new.py as explained below:
print( "hello world" )
5. A python file with .py extension will not run automatically. You have to type command in CLI (command line interface)
C:\Users\
C:\>cd xampp\
C:\xampp\
hello world
C:\xampp\
Or, in VSCode Editor ⇒ Terminal menu ⇒ New Terminal ⇒ (it will open the TERMINAL in VSCode Editor). Terminal is the Command Line Interface inside VSCode Editor, where you should type same commands:
1) Change to root directory, cd\
2) Go to the folder where new.py file is created/stored,
cd xampp\
3) Run Command: py new.py,
4) exit the Terminal ).
It is important to note that you have to go to location, where python CODE file is stored.
You can also use following commands, if you have any problem regarding adding New, or editing or removing old PATH (first locate the folder where python PROGRAM is located, and then locate the folder where python CODE is stored.). For example:
If your program and code is stored on different location, for example, following CLI command will help:
C:\Users\
It is advised that you should not store you Python program in "Program Files" folder which contains a space inside it. In Linux and Mac OS, it is generally tradition, not to name newly created files and folders with any space.
Other Editors and IDEs
There are other text/
Some python codes cannot run in CLI (command line interface), and therefore, you have to work in Python IDLE, Jupyter Notebook, Anaconda IDE, etc. which I will explain later, whenever required.
Leave a Comment:
Amit Sinha March 2nd, 2023 at 9:30 PM
😃 😄 😁 😆 😅 😂 😉 😊 😇 😍 😘 😚 😋 😜 😝 😶 😏 😒 😌 😔 😪 😷 😵 😎 😲 😳 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 😤
Ribhu March 3rd, 2023 at 9:30 PM
🐵 🐒 🐶 🐩 🐺 🐱 🐯 🐅 🐆 🐴 🐎 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🐘 🐭 🐁 🐀 🐹 🐰 🐇
