how to execute python scripts in windows?

0 votes
can you give me an example?
Mar 27 in Python by Waseem
• 4,470 points
49 views

1 answer to this question.

0 votes

On Windows,

To run a python module without typing "python",

--> Right click any python(*.py) file

--> Set the open with property to "python.exe"

--> Check the "always use this program for this file type"

--> Append the path of python.exe to variable environment e.g. append C:\Python27 to PATH environment variable.

To Run a python module without typing ".py" extension

--> Edit PATHEXT system variable and append ".PY" extension to the list.

answered Mar 27 by Mohammad
• 3,130 points

Related Questions In Python

0 votes
1 answer

How to add to the python path in Windows?

You know what has worked for me ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,810 points
130 views
0 votes
0 answers

How to mix read() and write() on Python files in Windows

It appears that a write() immediately following a read() on a ...READ MORE

Oct 23, 2018 in Python by Aryya
• 500 points
57 views
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
2,721 views
+4 votes
7 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 351 views
0 votes
1 answer

how to delete a file in python?

to delete a file import os os.remove('filename') this will delete ...READ MORE

answered Mar 18 in Python by Mohammad
• 3,130 points
25 views
0 votes
2 answers

how to use sum() in python?

sum()=sum all item in a tuple  syntax: sum(iterble,start) iterable required. The ...READ MORE

answered Mar 26 in Python by rajesh
• 1,210 points
35 views