Re: [Tutor] calculation issue.

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 6:19 PM, Matthew Ngaha wrote: > > if this Pizza (pizza.b) was on hold at position y = 100 and the > previous pizza(pizza.a) had fallen an additional 132 pixels to 232 > before pizza.b was released, shouldn't pizza.b still only be at > position y = 100? how did it gain the a

Re: [Tutor] calculation issue.

2012-08-26 Thread Alan Gauld
On 26/08/12 23:11, eryksun wrote: On Sun, Aug 26, 2012 at 5:56 PM, Alan Gauld wrote: For a 60px pizza that means a gap of 79 pixels approx. Just to be clear, it's a gap of 79 pixels between the top y Yes, sorry that wasn't clear. The gap *between* images is only 19px. The 130% is how far

Re: [Tutor] calculation issue.

2012-08-26 Thread Matthew Ngaha
thanks guys. Eryksun your explaination was brilliant and clear. i understood what you explained but got a bit confused with this line: The bottom of the next pizza is at y = 100 + 100 = 200 if this Pizza (pizza.b) was on hold at position y = 100 and the previous pizza(pizza.a) had fallen an addi

Re: [Tutor] calculation issue.

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 5:56 PM, Alan Gauld wrote: > > For a 60px pizza that means a gap of 79 pixels approx. Just to be clear, it's a gap of 79 pixels between the top y coordinates, not between the bottom of one pizza and the top of the other. The latter gap is 79 - 60 = 19 pixels, or a 31.67% b

Re: [Tutor] calculation issue.

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 5:56 PM, Alan Gauld wrote: > > For a 60px pizza that means a gap of 79 pixels approx. Just to be clear, it's a gap of 79 pixels between the top y coordinates, not between the bottom of one pizza and the top of the other. The latter gap is 79 - 60 = 19 pixels, or a 31.67% b

Re: [Tutor] calculation issue.

2012-08-26 Thread Alan Gauld
On 26/08/12 19:09, Matthew Ngaha wrote: heres the code: > self.time_til_drop = int(new_pizza.height * 1.3 / Pizza.speed) + 1 so if, let's say the pizza height is 60(pixels). multiplying it by 1.3 gives me 78. dividing it by Pizza.speed seems pointless as Pizza.speed is 1, and i will get 78 ag

Re: [Tutor] calculation issue.

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 4:36 PM, eryksun wrote: > > it's 0. Once it's 0, a new pizza is created to be dropped. The > designer wants a 30% buffer (in steps) between the time one pizza has > finished dropping and the creation of a new pizza. To clarify, say the chef is at y=100, and a pizza is 100

Re: [Tutor] calculation issue.

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 2:09 PM, Matthew Ngaha wrote: > > heres the code: self.time_til_drop = int(new_pizza.height * 1.3 / > Pizza.speed) + 1 height / speed is the number of steps it takes for a pizza to fall its complete height. It sets time_til_drop to approximately 130% of that number (with a

[Tutor] calculation issue.

2012-08-26 Thread Matthew Ngaha
Hi guys ive been reading a beginners book on python and the author created a simple game with the liewires package. I understand the explaination but there is just 1 part that i don't quite get. I'm not great at maths but this isn't complex at all. i don't know if i should post the whole code, cos'

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread eryksun
On Sun, Aug 26, 2012 at 7:55 AM, Ray Jones wrote: > > [0x8d42554] stream_out_standard stream out error: no mux specified or > found by extension > [0x8d42134] main stream output error: stream chain failed for > `standard{mux="",access=""#duplicate{dst="transcode{vb=400}",dst="std{access=file,mux=a

Re: [Tutor] askopenfilename - columns missing in navigationwindow

2012-08-26 Thread Steven D'Aprano
On 26/08/12 11:56, Joel Levine wrote: Mystery of the day: I'm using Python 2.6. My program uses from tkFileDialog import askopenfilename and fn=askopenfilename() I use this program repeatedly. Up to a few hours ago, the navigation window opened with a full array of columns, including name

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
On 08/26/2012 05:57 AM, Don Jennings wrote: > > On Aug 26, 2012, at 12:25 AM, tutor-requ...@python.org > wrote: > >> Message: 2 >> Date: Sat, 25 Aug 2012 17:46:08 -0700 >> From: Ray Jones mailto:crawlz...@gmail.com>> >> To: tutor@python.org

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Don Jennings
On Aug 26, 2012, at 12:25 AM, tutor-requ...@python.org wrote: > Message: 2 > Date: Sat, 25 Aug 2012 17:46:08 -0700 > From: Ray Jones > To: tutor@python.org > Subject: [Tutor] 2.7.3 Popen argument issues > Message-ID: <503971d0.5040...@gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 >

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
On 08/25/2012 10:19 PM, eryksun wrote: > On Sat, Aug 25, 2012 at 11:02 PM, eryksun wrote: >> out_file = "testing.avi" >> out_ip = "127.0.0.1" >> out_port = "11300" >> dst_file = '"transcode{vb=400}:std{access=file,mux=avi,dst=%s}"' % out_file >> dst_http = '"std{access=http,mux=mpjpeg,dst=%s:%s}"'

Re: [Tutor] better tools

2012-08-26 Thread Jordan
On 08/22/2012 06:51 PM, Don Jennings wrote: [slightly OT] After watching Bret Victor's talk[1], I want **much** better tools for programming (and all of the other stuff I do on the computer). John Resig, creator of jQuery, claims[2] that Victor's presentation inspired the new platform for