iFocus.Life News News - Breaking News & Top Stories - Latest World, US & Local News,Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The iFocus.Life,

How to Compile Python Commands

104 55
    • 1). Go to the py2exe project page on Sourceforge.net. Download and install the program.

    • 2). Open a new Notepad document. Type:

      from distutils.core import setup
      import py2exe
      setup(console=['example.py'])

      Replace "example" with your Python file's name. Save the Notepad document as "setup," then rename it from "setup.txt" to "setup.py."

    • 3). Click the Windows "Start" icon. Type "cmd" and press "Enter" to open the Windows Command Prompt.

    • 4). Type "cd /" followed by the directory in which you have python installed, then press "Enter."

    • 5). Type "python setup.py install" and press "Enter."

    • 6). Type "python setup.py py2exe" and press "Enter."

    • 7). Type "example.exe" replacing "example" with your Python program's name to test your executable.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
You might also like on "Technology"

Leave A Reply

Your email address will not be published.