-1

Please i really need help.

I have this problem which i have been unable to solve.

I wrote some python gui script of which i want to create a win32 app from for portabilty(i.e not compel all my app user to download/install python) and to make my application close sourced.

I have decided to use/ tried using pyinstaller and py2exe but have always had this problem. My gui application shows up with a console window accompanining it.

I have tried several thing to prevent this but all were in vain. I tried changing the extension from .py to .pyw and repackaging but got same result.

Please i need help on how to avoid/override this. Thanks for you help in advance

Note: I use python 2.7.11 on a window 7 32bit system. And please dont mark my question as duplicate in reference to questions like : Run Python script without Windows console appearing or How to hide console window in python? as my question is completely different.

Thanks for your help in advance.

Community
  • 1
  • 1
  • 1
    `pyinstaller.py --onefile --no-console my_script.py` – Joran Beasley Mar 29 '16 at 22:49
  • What i mean exactly is: for example most java programmer or any body who have used or seen netbeans at startup might notice the fact that at first netbeans displays a console window which latter vanished after some second following the appearance of a splash scren. Unlike the other java ide "bluej" which shows a console window which persists throughout the use of the program. So i mean that i need something similar to that of netbeans. Thanks in advance. – Chimaobi Emmanuel Ezeigbo Mar 29 '16 at 22:50
  • Thanks joran. I think that should work/ is what i need but i am yet to confirm it. I will tomorrow and will get back to you then because it is already midnight here in Nigeria. For sschale, no need for code here i guess because i/one just need to follow the normal syntax of packaging with py2exe or pyinstaller Thanks – Chimaobi Emmanuel Ezeigbo Mar 29 '16 at 22:58
  • Thanks joran it worked though not exactly as you stated. – Chimaobi Emmanuel Ezeigbo Mar 29 '16 at 23:23
  • Please is there also anyother way to do it using py2exe – Chimaobi Emmanuel Ezeigbo Mar 30 '16 at 00:58

1 Answers1

2

I was able to get it working with pyinstaller by using the --no-console argument i.e by adding -w. Here is the syntax of my code.

pyinstaller -F -w my_script.py

where -F is to creates one file for standalone app i.e --onefile and -w is to disable console window i.e --no-console.

Thanks.