if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
But the run module cannot be imported.
run.py is part of the demo. Copy that file to the same as your script. That module takes care of creating a wx.App and a frame the demo can run in (and possible some more).
I've copied this from the pyShell demo program, in the Wx demo launcher.
I've saved this as a separate file and tried to run it.
But the run module cannot be imported.
run.py is part of the demo. Copy that file to the same as your script. That module takes care of creating a wx.App and a frame the demo can run in (and possible some more).
Or you can just as easily break all ties to the demo framework and just create your own frame to put the shell in, and create your own app.
import wx
import wx.py as py
intro = 'Welcome To PyCrust %s - The Flakiest Python Shell' % py.version.VERSION