Run Python app at startup

dave_mikesell at fastmail.fm dave_mikesell at fastmail.fm
Sun Mar 2 19:23:10 EST 2008


On Mar 2, 3:37 pm, "SMALLp" <po... at email.t-com.hr> wrote:
> Hy.
> I create simple application. Yust an windows and "compile" it with
> py2exe. I add registry  value
> reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v
> MyApp /t REG_SZ /d C:\myapp.exe /f'
>
> And it wont start. When i use console instead od window in py2exe i get
> console opend but it closes.
>
> Program:
> <code prog.py>
> import os
> import wx
>
> app = wx.App()
> frame = wx.Frame(None, -1, "MyFrame")
> frame.Show()
>
> app.MainLoop()
> </code>
>
> Then in commang prompt:
>
> python.exe setup.py py2exe
>
> <code of setup.py>
> from distutils.core import setup
> import py2exe
>
> setup(console=['prog.py'])
> </code>

Don't you have to include the wxPython code somehow, perhaps on the
command line when building the exe?




More information about the Python-list mailing list