Re: [Tutor] new to threading, Queues

2013-04-18 Thread Jordan
On 04/18/2013 02:16 AM, Chuck Mayers wrote: Hi! I was having a bit of nostalgia today, and thought I'd try to write a simple, old school BBS. I found the 'paramiko' library, and I've got something I can SSH into that would have impressed my 1990's self. I found some example code of the "th

Re: [Tutor] design question (Django?)

2013-04-18 Thread Wayne Werner
On Sun, 14 Apr 2013, Don Jennings wrote: On Apr 14, 2013, at 7:06 AM, Albert-Jan Roskam wrote: > Subject: Re: [Tutor] design question (Django?) On 13/04/13 09:48, Albert-Jan Roskam wrote: I think I have to make a diagram of this. This stuff is quite hard Would it also be a good idea

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Danilo Chilene
On Wed, Apr 17, 2013 at 8:21 PM, Dave Angel wrote: > > -- Forwarded message -- >> From: Danilo Chilene >> Date: Wed, Apr 17, 2013 at 2:17 PM >> Subject: Re: [Tutor] Sys.argv read parameters >> To: Danny Yoo >> >> >> Hello Danny, >> >> The part that is changing is just the sys.a

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Dave Angel
On 04/18/2013 09:21 AM, Danilo Chilene wrote: On Wed, Apr 17, 2013 at 8:21 PM, Dave Angel wrote: -- Forwarded message -- From: Danilo Chilene Date: Wed, Apr 17, 2013 at 2:17 PM Subject: Re: [Tutor] Sys.argv read parameters To: Danny Yoo Hello Danny, The part that is ch

Re: [Tutor] design question (Django?)

2013-04-18 Thread Walter Prins
Hi, On Sun, 14 Apr 2013, Don Jennings wrote: > > >> On Apr 14, 2013, at 7:06 AM, Albert-Jan Roskam wrote: >> >> >>> >>> > Subject: Re: [Tutor] design question (Django?) >>> On 13/04/13 09:48, Albert-Jan Roskam wrote: I think I have to make a diagram of this. This stuff is qui

[Tutor] path directory backslash ending

2013-04-18 Thread Jim Mooney
Minor question. I was adding the Py Script directory to the Win 7 Path, and noticed that Python33 ends with a backslash but many directories do not. Is there a difference? Should I use backslash or not preferentially, or doesn't it matter at all? It does seem odd that there's no convention for this

Re: [Tutor] path directory backslash ending

2013-04-18 Thread Dave Angel
On 04/18/2013 12:45 PM, Jim Mooney wrote: Minor question. I was adding the Py Script directory to the Win 7 Path, and noticed that Python33 ends with a backslash but many directories do not. Is there a difference? Should I use backslash or not preferentially, or doesn't it matter at all? It does

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Danilo Chilene
On Thu, Apr 18, 2013 at 10:31 AM, Dave Angel wrote: > On 04/18/2013 09:21 AM, Danilo Chilene wrote: > >> On Wed, Apr 17, 2013 at 8:21 PM, Dave Angel wrote: >> >> >>> -- Forwarded message -- >>> From: Danilo Chilene Date: Wed, Apr 17, 2013 at 2:17 PM Subject: Re:

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Dave Angel
On 04/18/2013 01:14 PM, Danilo Chilene wrote: The following code has little to do with anything that happened before. So you should start a new thread for this new project. Below is the final code: import requests, json, sys r = requests.get('http://napmongo01.cvc.com.br:28017/_sta

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Alan Gauld
On 18/04/13 18:14, Danilo Chilene wrote: for command in commands: if arg in commands: print commands[command] else: print 'Invalid command' I don't understand what you are doing here? Its almost a random selection mechanism? You print the command for every item in

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Danilo Chilene
On Thu, Apr 18, 2013 at 2:52 PM, Alan Gauld wrote: > On 18/04/13 18:14, Danilo Chilene wrote: > > for command in commands: >> if arg in commands: >> print commands[command] >> else: >> print 'Invalid command' >> > > I don't understand what you are doing here? Its almos

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Danny Yoo
Ok, good. This is _much_ more realistic code, and demonstrates why seeing context is important. My suggestion to do it computationally is totally invalid here. :P There's a lot of variation here, due to the access paths through the JSON that you're walking. You're essentially defining a very l

Re: [Tutor] Fwd: Sys.argv read parameters

2013-04-18 Thread Danny Yoo
Followup: compare the previous interpreter code with this revision: https://gist.github.com/dyoo/5415464 and you'll see how it becomes easier now to add new command types into the system. ___ Tutor maillist - Tutor@python.org To unsubscribe or cha

Re: [Tutor] path directory backslash ending

2013-04-18 Thread eryksun
On Thu, Apr 18, 2013 at 12:45 PM, Jim Mooney wrote: > Minor question. I was adding the Py Script directory to the Win 7 > Path, and noticed that Python33 ends with a backslash but many > directories do not. Is there a difference? Should I use backslash or > not preferentially, or doesn't it matter

Re: [Tutor] path directory backslash ending

2013-04-18 Thread Jim Mooney
Well, under the principle of least harm, it appears that since the trailing backslash causes no harm if omitted, but sometimes does if allowed, I removed them all. But that's in win 7. Is it okay to always omit them in Linux? Python33 is itself installed with a trailing backslash, so I figured th