Tony,Not sure if you're still looking for a solution since it's been a while since this thread has been touched but it came up in my searches and I would like to offer a solution so that folks in the future can see it too.I was able to get around this issue by writing a separate script, saving it as a .pyw (thus forcing pythonw.exe to read it, rather than python.exe) and then importing it as a 'library' into my main script. Since I am at the moment writing a Python Add-in for Arc Catalog I'll use that as an example.First you write the code that gives you your window/app/etc#!/usr/bin/python
#wxWorkAround.pyw
import wx
# This just gives up a blank, re-sizable window.
def main():
app = wx.App()
frame = wx.Frame(None, -1, 'simple.py')
frame.Show()
app.MainLoop()
(Lets say you were trying to have a window pop up when you clicked a button in a Python Add In) Save that script as a .pyw and then import it like you would any other script, and then call it like this:class sampleButton(object):
"""Implementation for GRRTool_addin.sampleButton (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
wxWorkAround.main()
It has worked for me (at least within ArcCatalog), so I hope this helps somebody in the future.