Python: Two Windows Opening
ok so for the past two weeks or so, ive been learning python as it is extremely simple to comprehend and a very handy method of creating a GUI for a program. However i have three problems.
First, when i open my .py file a command window opens , and then my program opens on top of that. Is there a way to just open the program? (and not the command window)
Second, ive been eagerly searching for a simple method of compiling (or "interpreting") my .py filesinto .exe files. ive come across a few people saying that the program called py2exe is the best method, however i cant get it to work... Are there any easier methods for compiling python source codes into executable files?
Third, can anyone refer me to a site with a list of modules for python, along with their descriptions and.or examples? this would greatly help me as i tried using the built in help commands in the python command line, but i find that too generic, like it gives the syntax but no examples of what applications each command/module has.
P.S: Just wondering, is there a site that offers example programs (and their source codes) that were made with python that i could take a look at to better understand this language? (examples: Python Games, Python GUI applications, Python Questionaires, Any Python Programs/applications that demons开发者_运维技巧trate the language's usefulness)
INFORMATION:
OS: WINDOWS 7: Ultimate Edition
Python Version: 2.6
Thanks in Advance!
To keep the command window from opening, you can save it as a .pyw file, as opposed to the usual .py. As for converting to exe, py2exe works best for me, I know there are several others, but not as fully developed as py2exe is. Python.org should contain a list of most modules. The same results could easily be procured by googling python modules. EDIT: Also, as for the gui, I have found that I personally like pyqt and tkinter best.
Use
pythonw.exe
instead ofpython.exe
to run your program.I use
cx_freeze
; docs on their website.PyPI
精彩评论