How to run a .py program from python IDLE in Windows?

1

I'm learning to program in python and I made a small program, but I can not execute it through the terminal (IDLE or sheel) of python program name: salario_real.py error

    
asked by anonymous 01.07.2017 / 23:23

1 answer

1

To run a Python script, you need to be at the Windows command prompt, then just type the following:

python meuPrograma.py

Or if you want to run the script in IDLE interactively, you will need to use a function for it.

Running script in IDLE with execfile function:

execfile('meuPrograma.py')

In this way you could execute script in IDLE.

Font .

    
02.07.2017 / 00:14