Python
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Python

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old March 19th, 2008, 11:40 PM
Trey K
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Need Help with wx.py.shell !!!

Hey all,
I'm running on a bit of a tight schedule, and I need help with a wxpython
app.
Here's a dialog for running some code:
import sys
import os
import wx
def Run(self, event):
class RunDialog(wx.Dialog):
def __init__(self, parent, eCode):
wx.Dialoginit__(self, parent, title=("Run"))
self.eCode = eCode

self.MakeRunCode()

f = open(os.path.abspath(os.path.dirname(sys.argv[0])) +
"/tempcode.pyw", 'w')
f.write(self.eSaveCode)
f.close()

pyshl = py.shell.Shell(self, -1, introText="Running your
Element program in its Pythonic equivalent\n")
pyshl.runfile(os.path.abspath(os.path.dirname(sys. argv[0]))
+ "/tempcode.pyw")
def ShowECompileProblem(self, eName):
dlg = wx.MessageDialog(None, eName, 'Error while
running', K | wx.ICN_INFRMATIN)
dlg.ShowModal()
def MakeRunCode(self):
self.eSaveCode = self.eCode

dlg = RunDialog(None, "print \"it worked!\"")
dlg.ShowModal()
dlg.Destroy()
The first part is what I need a bit of help with.
The pyshl object is supposed to be a python interpreter that comes up on the
dialog. The only problem is I don't get any errors showing that I've done
anything wrong. It would be great if someone showed me what I'm doing wrong.
I hope that the code snippet I posted works. But anyway, I just need to know
what I'm doing wrong. I would be VERY grateful if anyone could help me with
this ASAP.

Thanks!!!

Reply With Quote
  #2  
Old March 20th, 2008, 12:20 AM
Trey K
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Need Help with wx.py.shell !!!

Hey all,
I'm running on a bit of a tight schedule, and I need help with a wxpython
app.
Here's a dialog for running some code:
import sys
import os
import wx
def Run(self, event):
class RunDialog(wx.Dialog):
def __init__(self, parent, eCode):
wx.Dialoginit__(self, parent, title=("Run"))
self.eCode = eCode

self.MakeRunCode()

f = open(os.path.abspath(os.path.dirname(sys.argv[0])) +
"/tempcode.pyw", 'w')
f.write(self.eSaveCode)
f.close()

pyshl = py.shell.Shell(self, -1, introText="Running your
Element program in its Pythonic equivalent\n")
pyshl.runfile(os.path.abspath(os.path.dirname(sys. argv[0]))
+ "/tempcode.pyw")
def ShowECompileProblem(self, eName):
dlg = wx.MessageDialog(None, eName, 'Error while
running', K | wx.ICN_INFRMATIN)
dlg.ShowModal()
def MakeRunCode(self):
self.eSaveCode = self.eCode

dlg = RunDialog(None, "print \"it worked!\"")
dlg.ShowModal()
dlg.Destroy()
The first part is what I need a bit of help with.
The pyshl object is supposed to be a python interpreter that comes up on the
dialog. The only problem is I don't get any errors showing that I've done
anything wrong. It would be great if someone showed me what I'm doing wrong.
I hope that the code snippet I posted works. But anyway, I just need to know
what I'm doing wrong. I would be VERY grateful if anyone could help me with
this ASAP.

Thanks!!!

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Python > Need Help with wx.py.shell !!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT