shane wrote:

i was trying to put the math.py into a frame Ive watched many tutorials.
But cant seem to find out how to or where to place the code
the files I want combined are attached.

Do you mean you want to show the code in the GUI? You need to know the location of the file, then read the file and put the text into the frame. The fact that the text is actually code is irrelevant -- it could be poetry, a shopping list, code, or random gibberish.

I'm afraid I don't know enough about wxPython to tell you how to display text in the frame, but you can read the file like this:


fp = open(r'C:\path\to\my\file\module.py', 'r')
text = fp.read()
fp.close()


Also I see that you have a file called "math.py". That is a bad idea, because it will clash with a standard Python module also called "math". Best to find another name for it.



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to