0

I have written a simple program in python which takes input value and display result accordingly.

Program: Test.py

a=raw_input('Enter value1:')
b=raw_input('Enter value2:')
#Do some work here based on passed inputs

I have to run the program in the different system where there will not be python installed. So I created Test.exe file using pyinstaller.

Now when I run .exe it's getting closed within seconds.

Question: How can I give a message Enter value1: to user to put some input values by running .exe file?

4
  • c:\python27\python -m pyinstaller --onefile test.py .... at a guess you installed pyinstaller for python3 inadvertently ... Commented Jun 8, 2018 at 4:32
  • Please give the reason for down vote. Commented Jun 8, 2018 at 4:32
  • 1
    Can you tell us how did you created test.exe using pyinstaller? Commented Jun 8, 2018 at 4:36
  • @Azhy, I new to python, so I just followed this: youtube.com/watch?time_continue=63&v=lOIJIk_maO4 Commented Jun 8, 2018 at 4:44

1 Answer 1

1

make.bat

rem CREATE our test.py
echo a=raw_input('Enter value1:') > test.py
echo b=raw_input('Enter value2:') >> test.py

rem Install Pyinstaller
c:\python27\python -m pip install pyinstaller -U
rem Build IT!!!!!
c:\python27\scripts\pyinstaller --onefile test.py
rem RUN IT!!!!
dist\test.exe
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.