[Tutor] Command line scripts

Alan Gauld alan.gauld at btinternet.com
Sat Jan 8 15:10:43 CET 2011


"David Hutto" <smokefloat at gmail.com> wrote

> If I use as command line script, is there any disruption in the
> execution of the code using wxpython.

I don't understand the question.
wxPython is a GUI toolkit so how would you have a command
line script using wxPython? Or do you mean running a wxPython
GUI program from the command line? - that should work just fine.

> In other words, is a command line app different from
> bindings in a compiled app?

What kind of bindings?
And what do you mean by a compiled app?
Python is interpreted (or actually compiled to byte code
and the byte code is interpreted - but its the same principle).
So-called exe generators simply bundle the interpreter witrh
the code and auto run it.

And wxPython is irrelevant to that debate since it is just
a set of modules regardless of how you run it.

>       @ trace
>       def play(self, event = None, text = None):
>               if event == None:
>                       self.textlist = []
>                       for item in text.split(' '):
>                               self.textlist.append(item)
>                       print self.textlist
>                       for word in self.textlist:
>                               self.espeak =
>                                       subprocess.Popen(['espeak', 
> word], stdout =
> 
> subprocess.PIPE).communicate()[0]
>               if event != None:
>                       self.textlist = []
>                       for item in 
> self.text2speech.GetValue().split(' '):
>                               self.textlist.append(item)
>                       print self.textlist
>                       for word in self.textlist:
>                               self.espeak =
>                                        subprocess.Popen(['espeak', 
> word], stdout =
> 
> subprocess.PIPE).communicate()[0]

Sorry, I'm missing the significance of this function?

Confused,.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list