[Tutor] imbedding python into another program?
Jeff Peery
jeffpeery at yahoo.com
Wed Aug 3 21:04:05 CEST 2005
Andre, thanks for the help with this. I put it to work yesterday and it works perfectly.
was wondering if it is possible to import modules without a users having to type 'import whatever'. for example in my application I would like the user to just start operating on arrays that exist in my program. But I have to load both the arrays and Numeric into the python shell that I created. how can I do this? thanks.
André Roberge <andre.roberge at gmail.com> wrote:
Jeff Peery wrote:
> hello, is it possible to add something like the python IDLE into
> another program, say if I wanted to simply run scripts from within a
> wxPython program? Could someone point me to the correct reference?
> thanks.
>
Hi Jeff,
you may want to have a look at PyCrust, PyShell and the like.
I do something like this in my rur-ple app (on sourceforge).
The relevant lines of code are:
import wx.py as py
[inside a wx.Notebook]
win = py.shell.Shell(self.window, -1,
introText = tr.INTERPRETER_INTRO_TEXT)
self.window.AddPage(win, tr.PYTHON_INTERPRETER)
============
HTH,
André
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050803/08f0dfff/attachment.htm
More information about the Tutor
mailing list