Re: [Tutor] Running .py files in shell

2011-09-22 Thread Steven D'Aprano
Robert Layne wrote: Well everybody, sorry for the incomplete sentences and overall poor English but I wanted to make this simple to read and understand for someone who is completely inexperienced in any sort of programming, Generally speaking, incomplete sentences and overall poor English mak

Re: [Tutor] How it is better than java

2011-09-22 Thread Steven D'Aprano
Mac Ryan wrote: On Tue, 20 Sep 2011 10:27:12 +1000 Steven D'Aprano wrote: There are three misunderstandings with that statement. [snip] There's also JPype, which claims to give full access to Java libraries in Python. Now: this was one of the best write-ups on the subject I read. Concise, c

[Tutor] range question

2011-09-22 Thread Joel Knoll
Given a range of integers (1,n), how might I go about printing them in the following patterns: 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 etc., e.g. for a "magic square". So that for the range (1,5) for example I would get 1 2 3 42 3 4 13 4 1 24 1 2 3 I just cannot figure out how to make the

Re: [Tutor] range question

2011-09-22 Thread James Reynolds
On Thu, Sep 22, 2011 at 10:27 AM, Joel Knoll wrote: > Given a range of integers (1,n), how might I go about printing them in the > following patterns: > > 1 2 3 4 ... n > 2 3 4 5 ... n 1 > 3 4 5 6 ... n 1 2 > > etc., e.g. for a "magic square". So that for the range (1,5) for example I > would ge

Re: [Tutor] range question

2011-09-22 Thread Dave Angel
On 09/22/2011 10:27 AM, Joel Knoll wrote: Given a range of integers (1,n), how might I go about printing them in the following patterns: 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 etc., e.g. for a "magic square". So that for the range (1,5) for example I would get 1 2 3 42 3 4 13 4 1 24 1 2

[Tutor] range question

2011-09-22 Thread Hugo Arts
forgot to forward to list: From: Hugo Arts Date: Thu, Sep 22, 2011 at 4:42 PM Subject: Re: [Tutor] range question To: d...@davea.name On Thu, Sep 22, 2011 at 4:37 PM, Dave Angel wrote: > On 09/22/2011 10:27 AM, Joel Knoll wrote: > > Given a range of integers (1,n), how might I go about printin

Re: [Tutor] range question

2011-09-22 Thread Joel Goldstick
On Thu, Sep 22, 2011 at 10:37 AM, Dave Angel wrote: > ** > On 09/22/2011 10:27 AM, Joel Knoll wrote: > > Given a range of integers (1,n), how might I go about printing them in the > following patterns: > 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 > etc., e.g. for a "magic square". So that for

Re: [Tutor] range question

2011-09-22 Thread Dave Angel
On 09/22/2011 10:43 AM, Hugo Arts wrote: forgot to forward to list: From: Hugo Arts Date: Thu, Sep 22, 2011 at 4:42 PM Subject: Re: [Tutor] range question To: d...@davea.name On Thu, Sep 22, 2011 at 4:37 PM, Dave Angel wrote: On 09/22/2011 10:27 AM, Joel Knoll wrote: Given a range of intege

Re: [Tutor] range question

2011-09-22 Thread Hugo Arts
On Thu, Sep 22, 2011 at 4:56 PM, Dave Angel wrote: > > The second correction is important, the first one wrong.  The OP's example > was looking for the numbers 1 through 4, so range(1,5) was correct. > -- > > DaveA > > Ah, apologies. I misread the OP __

Re: [Tutor] range question

2011-09-22 Thread Steven D'Aprano
Joel Knoll wrote: Given a range of integers (1,n), how might I go about printing them in the following patterns: 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 etc., e.g. for a "magic square". So that for the range (1,5) for example I would get 1 2 3 42 3 4 13 4 1 24 1 2 3 I'm not sure what

Re: [Tutor] range question

2011-09-22 Thread James Reynolds
On Thu, Sep 22, 2011 at 11:08 AM, Steven D'Aprano wrote: > Joel Knoll wrote: > >> Given a range of integers (1,n), how might I go about printing them in the >> following patterns: >> 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 etc., e.g. for a "magic >> square". So that for the range (1,5) for e

[Tutor] Help!

2011-09-22 Thread Joseph Shakespeare
Hello, I am new Python (about 2 weeks) and need some help. I am making a rock paper scissors game that a user can play with the computer by using a while loop and if elif else statements. It needs to keep score of the amount of losses and wins, and give the user the option to play again after each

Re: [Tutor] Help!

2011-09-22 Thread Prasad, Ramit
From: tutor-bounces+ramit.prasad=jpmorgan@python.org [mailto:tutor-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of Joseph Shakespeare Sent: Thursday, September 22, 2011 12:05 PM To: tutor@python.org Subject: [Tutor] Help! Hello, I am new Python (about 2 weeks) and need some help.

Re: [Tutor] Help!

2011-09-22 Thread xDog Walker
Move the following two lines to immediately follow the while. player=raw_input("Please pick your throw: (r,s,p):") computer= random.choice(['r','s','p']) -- I have seen the future and I am not in it. ___ Tutor maillist - Tutor@python.org To unsub

Re: [Tutor] paper scissors

2011-09-22 Thread bob gailer
On 9/22/2011 1:04 PM, Joseph Shakespeare wrote: Hello, Hi - please use a meaningful subject line - I've changed it this time I am new Python (about 2 weeks) and need some help. I am making a rock paper scissors game that a user can play with the computer by using a while loop and if elif el

[Tutor] Need a bump in the right direction (network programming)

2011-09-22 Thread Cheeyung
I'm creating a mobile application and I'm using python for a desktop server. However, I don't have access to a static IP on the desktop, but do have a website. Is it possible to connect from mobile -> http website -> desktop server and back? What kind of (python) libraries/functions am I looki