Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread Alan Gauld
"Alan Gauld" <[EMAIL PROTECTED]> wrote $ program.py addMe create the server with a socket that listens for clients on a port create a client that talks to the socket via that port. Other options, cruder but arguably simpler, involve sharing a database and using one table for input and a

Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread Robert Berman
Excellent idea. Its simplicity makes it both doable with ease and very reliable. Thanks for this suggestion. Robert Alan Gauld wrote: "Alan Gauld" <[EMAIL PROTECTED]> wrote $ program.py addMe create the server with a socket that listens for clients on a port

Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread James
Thanks for the responses, folks. I started poking around and another option is Pyro (an alternative to xml-rpc when dealing solely with Python). Thanks again! -j On Fri, Aug 22, 2008 at 10:12 AM, Robert Berman <[EMAIL PROTECTED]> wrote: > > Excellent idea. Its simplicity makes it both doable with

Re: [Tutor] Reformatting phone number

2008-08-22 Thread Lie Ryan
> Message: 4 > Date: Thu, 21 Aug 2008 12:13:58 +0200 > From: "Dotan Cohen" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Reformatting phone number > To: OmerT <[EMAIL PROTECTED]> > Cc: "python-tutor." > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8 > > 2008/8/21

Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread Lie Ryan
> Message: 8 > Date: Fri, 22 Aug 2008 10:28:44 +0100 > From: "Alan Gauld" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] pass argument into running program *outside* of > program > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; format=flowed; charset="iso-885

Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread Emile van Sebille
Lie Ryan wrote: In a much simpler situation, even a communicating from a plain file could be enough. In the daemon's program folder, there'll be two files: input and output. You write to input to instruct the server and read the response from output. This model is in respect to Unix's philosophy

[Tutor] Unicode strings

2008-08-22 Thread eShopping
Hi I am trying to read in non-ASCII data from file using Unicode, with this test app: vocab=[("abends","in the evening"), ("aber","but"), ("die abflughalle","departure lounge"), ("abhauen","to beat it/leave"), ("abholen","to collect/pick up"), ("das Abitur","A-levels"), ("abmachen","to take of

Re: [Tutor] Problems with Gauge Bar.

2008-08-22 Thread Olrik Lenstra
It works! :) My program is now as good as done, only one thing that bothers me a bit. When I click the scan button the GUI Freezes because it is handling the onScan function. Is there any way to prevent this? Regards, Olrik ___ Tutor maillist - Tutor@p

Re: [Tutor] Unicode strings

2008-08-22 Thread Kent Johnson
On Fri, Aug 22, 2008 at 2:23 PM, eShopping <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to read in non-ASCII data from file using Unicode, with this > test app: > > vocab=[("abends","in the evening"), > ("die Auff\xFCrung","performance (of a play)"), > ("der Au\xDFenhandel","foreign trade") The

[Tutor] Python Docs (Was: Reformatting phone number)

2008-08-22 Thread Dotan Cohen
2008/8/22 Lie Ryan <[EMAIL PROTECTED]>: > You should also be aware of python's introspection abilities. If you > have an object, you could do help(object), dir(object) to get the help > file and a dictionary containing the members of the object (if run from > a script, you might need to add print s

Re: [Tutor] Python Docs (Was: Reformatting phone number)

2008-08-22 Thread Kent Johnson
On Fri, Aug 22, 2008 at 4:23 PM, Dotan Cohen <[EMAIL PROTECTED]> wrote: > 2008/8/22 Lie Ryan <[EMAIL PROTECTED]>: >> You should also be aware of python's introspection abilities. If you >> have an object, you could do help(object), dir(object) to get the help >> file and a dictionary containing the

Re: [Tutor] Python Docs (Was: Reformatting phone number)

2008-08-22 Thread Ricardo Aráoz
Hansen, Mike wrote: On Thu, Aug 21, 2008 at 12:01 PM, Dotan Cohen <[EMAIL PROTECTED]> wrote: 2008/8/21 Kent Johnson <[EMAIL PROTECTED]>: Chapters 2 and 3 of the library reference are highly recommended. http://docs.python.org/lib/lib.html Let's start from there. I need the startswith() function

Re: [Tutor] Problems with Gauge Bar.

2008-08-22 Thread Alan Gauld
"Olrik Lenstra" <[EMAIL PROTECTED]> wrote When I click the scan button the GUI Freezes because it is handling the onScan function. Is there any way to prevent this? This is back to where we started in that you need to break the onScan function down such that you only process a portion of the

Re: [Tutor] pass argument into running program *outside* of program

2008-08-22 Thread Alan Gauld
"Lie Ryan" <[EMAIL PROTECTED]> wrote sharing a database and using one table for input and another for output. The server polls the input table and writes output to In a much simpler situation, even a communicating from a plain file could be enough. In the daemon's program folder, there'll be

Re: [Tutor] Problems with Gauge Bar.

2008-08-22 Thread Olrik Lenstra
I attached the whole program. I'm pretty sure I made a lot of beginners mistakes, if you see something drastically wrong feel free to point it out ;-) Regards, Olrik 2008/8/23 Alan Gauld <[EMAIL PROTECTED]> > > "Olrik Lenstra" <[EMAIL PROTECTED]> wrote > > When I click the scan button the GUI F

[Tutor] Problem with creating a class to access a 2d array

2008-08-22 Thread lawful falafel
Hello, I am currently trying to teach myself python. This isnt my first language, as I used to be quite good at using java. But it seems to be a bit harder for me to understand some stuff. Right now, in trying to teach myself the language, I thought I would make a simple text based game, like Zork

Re: [Tutor] Problem with creating a class to access a 2d array

2008-08-22 Thread W W
On Fri, Aug 22, 2008 at 7:46 PM, lawful falafel <[EMAIL PROTECTED]>wrote: > I really like python, but the one thing I really hate is that most of the > tutorials treat it like interactive scripting instead of object oriented > development, which really confuses me. So basically right now I dont ev

Re: [Tutor] Problems with Gauge Bar.

2008-08-22 Thread Bill Burns
Olrik Lenstra wrote: It works! :) My program is now as good as done, only one thing that bothers me a bit. When I click the scan button the GUI Freezes because it is handling the onScan function. Is there any way to prevent this? Regards, Olrik You might try adding wx.SafeYield(self, True) i