Passing an argument to a EXE python function built with pyInstaller

I have the following simple function which compiles perfectly well with pyInstaller. The little function runs perfect at the python shell, for the filename

Code within the above filename:

def prnt(inStr):          
        print inStr

In order to execute in the python shell:

import printString


Which produces output:


How do I run the resultant printString.exe produced from pyInstallerr passing the the string argument myString to the EXE in a Windows 7 command window?

OS platform: Windows 7 64 Bit.

1 answer

  • answered 2018-02-17 00:25 J. Wolfe

    You have to call the function in your .py file if you want the .exe to do anything.

    def prnt(inStr):          
        print inStr
    prnt("string displayed by exe")