Note that there are some explanatory texts on larger screens.

plurals
  1. POCx_freeze exe troubleshooting
    primarykey
    data
    text
    <p>I wrote an application using wxpython and boa constructor. This application stores class instances in ordered dictionaries (I import odict) and ultimately stores the data in a shelve on the local machine. The application runs as I expect, so I want to distribute it. Previously, I have used pyinstaller but have learned that python 2.6 is not fully supported at this time (verified by me because my *exe didn't work) so I switched to cx_freeze. My newly compiled exe seems to run fine, but does not create the shelve file. Looking through the library file in the build folder, I do not see the odict module. I do see shelve. Seems like this is the problem but I don't know why odict is not automatically included. I get no errors when running the application so I'm not really sure how to go about finding the problem. Any tips or suggestions would be sincerely appreciated.</p> <p>Using python 2.6.6, wx python 2.8.11, cx_freeze 4.2.2 on windows XP.</p> <p>I wrote this example to try and determine if it would write the shelve file and it doesn't work after running cx_freeze....</p> <pre><code>import wx import sys import os import shelve def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1BUTTON1, ] = [wx.NewId() for _init_ctrls in range(2)] class Frame1(wx.Frame): def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt, pos=wx.Point(557, 369), size=wx.Size(400, 250), style=wx.DEFAULT_FRAME_STYLE, title='Frame1') self.SetClientSize(wx.Size(392, 223)) self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1', name='button1', parent=self, pos=wx.Point(0, 0), size=wx.Size(392, 223), style=0) self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button, id=wxID_FRAME1BUTTON1) def __init__(self, parent): self._init_ctrls(parent) def OnButton1Button(self, event): filename='c:\\MakeAShelve.db' data=[1,2,3,4] database=shelve.open(filename) database['data']=data database.close() if __name__ == '__main__': app = wx.PySimpleApp() frame = create(None) frame.Show() app.MainLoop() </code></pre> <p>The setup I ran is below and executed as python setup.py build</p> <pre><code>import sys from cx_Freeze import setup,Executable includefiles=[] exe=Executable( script="ShelveTesting.py", base="Win32Gui", ) setup( name="TimingDiagram", version="0.2", description="An Excel Based Timing Diagram Application", options={'build_exe':{'include_files':includefiles}}, executables=[exe] ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload