Python Forum
cx_freeze exe does not work?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cx_freeze exe does not work?
#4
(May-19-2018, 02:06 AM)Larz60+ Wrote: if using windows, try py2exe see: https://python-forum.io/Thread-Intermedi...ith-Py2exe
if Linux, pyinstaller
and if OS X, pyapp.

I'm on Python 3.6 and if there is a wheel file I would definitely give it a shot! I haven't seen one as of yet.

Kip...

Larz60+, I got px2exe installed now I'm trying to figure out how to build my setup file to build my executable file. I would prefer to have this be a single file.

Here is the Python code:
import os
import sys
import subprocess
from socket import *

subprocess.call("cls", shell=True)

theargis = ''

if len(sys.argv) > 1:
    theargis +=str(sys.argv[1])

if theargis > '':
    host = theargis
    print ("Using Client Address of: " + theargis)
else:
    host = "53.68.240.47"
    print ("Using Default Address!")

port = 13000
buf = 1024
addr = (host, port)

UDPSock = socket(AF_INET, SOCK_DGRAM)
UDPSock.bind(addr)

print ("Waiting to receive messages...")

while True:
    (data, addr) = UDPSock.recvfrom(buf)
    print ("Production number: " + data.decode("utf-8"))
    if data.decode("utf-8").upper() == "EXIT":
        break

UDPSock.close()
os._exit(0)
But the only example I can find is the tutorial for py2exe which is:
from distutils.core import setup
   import py2exe
   
   setup(console=['hello.py'])
To which I swapped out the 'hello.py' for Receiver.py.

This of course didn't work at all.

Any good references, to help me build the setup file I'd need to convert this py to a single file exe.

Thanks,
Kip...
Reply


Messages In This Thread
cx_freeze exe does not work? - by Skycoder - May-19-2018, 12:39 AM
RE: cx_freeze exe does not work? - by Larz60+ - May-19-2018, 02:06 AM
RE: cx_freeze exe does not work? - by KipCarter - Jan-13-2020, 05:28 PM
RE: cx_freeze exe does not work? - by KipCarter - Jan-10-2020, 05:26 PM
RE: cx_freeze exe does not work? - by KipCarter - Jan-13-2020, 06:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with cx_freeze app only on one pc floatingshed 0 1,802 Mar-19-2021, 05:19 PM
Last Post: floatingshed
Exclamation Help with cx_Freeze mederic39 3 2,899 Jan-31-2021, 12:05 PM
Last Post: snippsat
  cx_freeze frozen executive introduces WinError 10049 KipCarter 3 3,171 Jan-14-2020, 02:34 PM
Last Post: KipCarter
  Python 3.6 Alternatives to Cx_Freeze KipCarter 5 5,056 Jan-14-2020, 11:51 AM
Last Post: KipCarter
  How to get cx_Freeze to make folders mad_accountant 0 3,098 Nov-24-2019, 02:22 PM
Last Post: mad_accountant
  cx_freeze setup.py error: No module __SNMP-FRAMEWORK-MIB nacho 8 9,028 Jul-26-2019, 09:33 PM
Last Post: njmatt415
  Error in build using cx_freeze with psychopy based animation olivyac 0 2,918 Sep-19-2017, 07:55 PM
Last Post: olivyac

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020