I'm trying to run a Python program from the command line so I created a batch file like so:

```
@py.exe C:\MyPythonScripts\program.py%*
@pause

```

The script should print a simple message, but when I type "program" in the Windows Run program cmd appears for a second and closes itself. What am I doing wrong?.

This is the code:

```
#!python3

def printPicnic(itemsDict,leftWidth,rightWidth):
    print('PICNIC ITEMS'.center(leftWidth + rightWidth,'-'))
    for k,v in itemsDict.items():
        print(k.ljust(leftWidth,'.') + str(v).rjust(rightWidth))

picnicItems = {'sandwiches':4, 'apples': 12, 'cups': 4, 'cookies':8000}
printPicnic(picnicItems,12,5)
printPicnic(picnicItems,20,6)

```

This is my PATH variable:

```
> C:\Program Files (x86)\Common
> Files\Intel\Shared
> Files\cpp\bin\Intel64;C:\ProgramData\Oracle\Java\javapath;C:\Program
> Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files
> (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS
> Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
> Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
> (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
> (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
> (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files
> (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files
> (x86)\Skype\Phone\;C:\Program
> Files\Java\jdk1.8.0_121\bin;C:\MyPythonScripts;C:\Python34;C:\Program
> Files (x86)\Common Files\Intel\Shared
> Files\cpp\bin\Intel64;C:\ProgramData\Oracle\Java\javapath;C:\Program
> Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files
> (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS
> Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
> Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
> (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
> (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
> (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files
> (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files
> (x86)\Skype\Phone\;C:\Program
> Files\Java\jdk1.8.0_121\bin;C:\Python34\Scripts

```