Newsgroups: comp.lang.python
From: eric dexter <irc.dex...@gmail.com>
Date: Sun, 27 Jun 2010 20:45:10 -0700 (PDT)
Local: Sun, Jun 27 2010 11:45 pm
Subject: Re: problems getting os.system and wxmenu to read options from a file and then execute
On Jun 27, 8:18 pm, MRAB <pyt...@mrabarnett.plus.com> wrote:
> eric dexter wrote: I think it may and that is why there is a strip method. all 4 files > > On Jun 27, 5:56 pm, MRAB <pyt...@mrabarnett.plus.com> wrote: > >> Eric_Dex...@msn.com wrote: > >>> I managed to get the program running and the menu options are > >>> appearing on the list but the programs are not running. I suspect it > >>> is my onexecutemethod > >> [snip] > >>> #add execute files from the text file list > >> What you should actually be doing is passing a function which can be > >> wx.EVT_MENU(self, idtool, lambda idtool=idtool, e=e: > >>> idtool += 1 > > wx.EVT_MENU(self, idtool, self.OnExecute(idtool, e)) > > I changed it to this and it seems to be calling self.OnExecute befour > > > > I got rid off all the spaces but one in the text file (I> supose I need to use the strip method in real like though).. I was > > > t = line.split() > It won't then matter how many spaces or tabs are between the fields. want to execute befour the editor comes up so there is a problem of some sort that isn't adressed by that but it probily would be nice if I coded it that way. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||