Passing arguments to python . exe with cx_Freeze

Asked

Viewed 247 times

1

I have this code to test the script passage

ola py.

import sys

for arg in sys.argv:
    print (arg)
print ("Hello World!")

setup py.

from cx_Freeze import setup, Executable

setup(
    name='Ola',
    version='0.1',             
    description='ola Felipe',  
    executables= [Executable("ola.py")])

However, when I start the program on Windows, it does not work I tried to pass the program this way, but it didn’t work:

>start ola.py teste1 teste2

How should I pass the arguments to these executables? Or should I change something on setup.py before raising it?

1 answer

1


It was just the way I was calling :p

Needs to be:

ola.exe teste1 teste2

Browser other questions tagged

You are not signed in. Login or sign up in order to post.