Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Steven D'Aprano
On Fri, Aug 08, 2014 at 01:50:53AM -0700, Greg Markham wrote: [...] > So, how would I get this to display horizontally? > > Like so... > .-. .-. > | | |o| > | o | | | > | | |o| > `-' `-' Nice question! I recommend that you try to solve the problem

[Tutor] Pigs can fly?

2014-08-08 Thread Danny Yoo
Hi everyone, I'm curious if anyone has encountered: http://codegolf.stackexchange.com/questions/35623/are-pigs-able-to-fly As soon as I saw this problem, I felt strongly compelled to play with this. :P Of course, I can't show any solutions, but I thought the problem might be interesting to

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread emile
On 08/08/2014 10:58 AM, emile wrote: On 08/08/2014 01:50 AM, Greg Markham wrote: die_1 = """ .-. | | | o | | | `-'""" die_2 = """ .-. |o| | | |o| `-'""" Not quite sure how this part was dropped... >>> for line in zip(die_1.split("\n"),die_2.split("\n

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Mark Lawrence
On 08/08/2014 18:56, Joel Goldstick wrote: On Fri, Aug 8, 2014 at 4:50 AM, Greg Markham wrote: Hello, Python novice back again. :) I'm making progress in my learning process, but struggling whenever attempting to creatively go beyond what's required in the various chapter assignments. For e

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Danny Yoo
On Fri, Aug 8, 2014 at 1:50 AM, Greg Markham wrote: > Hello, > > Python novice back again. :) I'm making progress in my learning process, > but struggling whenever attempting to creatively go beyond what's required > in the various chapter assignments. For example, there's a simple random > die

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Alan Gauld
On 08/08/14 09:50, Greg Markham wrote: I wanted to make it a little more interesting by using ascii art representations of the six die. When printing, however, they do so vertically and not horizontally. Here's a snippet of the code: die_1 = """ .-. | | | o | | | `-'""" T

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread emile
On 08/08/2014 01:50 AM, Greg Markham wrote: die_1 = """ .-. | | | o | | | `-'""" die_2 = """ .-. |o| | | |o| `-'""" I'll leave the cleanup as an exercise for you. HTH, Emile ___ Tutor maillist - Tutor@py

Re: [Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Joel Goldstick
On Fri, Aug 8, 2014 at 4:50 AM, Greg Markham wrote: > Hello, > > Python novice back again. :) I'm making progress in my learning process, > but struggling whenever attempting to creatively go beyond what's required > in the various chapter assignments. For example, there's a simple random > die

[Tutor] Printing multi-line variables horizontally

2014-08-08 Thread Greg Markham
Hello, Python novice back again. :) I'm making progress in my learning process, but struggling whenever attempting to creatively go beyond what's required in the various chapter assignments. For example, there's a simple random die roller program that looks like the following: # Craps Roller

Re: [Tutor] Error in get pixel value in coordinate (x, y) using getPixel(x, y)

2014-08-08 Thread Steven D'Aprano
On Thu, Aug 07, 2014 at 06:49:02PM +0700, Whees Northbee wrote: > Please help me... I'm using python 2.7.6, numpy 1.8.1, opencv 2.4.9.. > I want to get pixel value in one number like 255 not each value like these > R(190), G(23), B(45) from coordinate (x,y)... > I try these code > m_samples[k][i][j

Re: [Tutor] Python twitter "errors":[{"message":"Could not authenticate you", "code":32

2014-08-08 Thread Alan Gauld
On 08/08/14 05:57, Chris wrote: I'm trying to execute the examples from https://github.com/sixohsix/twitter with the current library version installed by pip install (1.14.3). Since this list is for the core language and standard library this is a bit off list. You might get more response dire

[Tutor] Python twitter "errors":[{"message":"Could not authenticate you", "code":32

2014-08-08 Thread Chris
Dear All, I'm trying to execute the examples from https://github.com/sixohsix/twitter with the current library version installed by pip install (1.14.3). #!/usr/bin/env python # -- coding: utf-8 -- from twitter import * con_secret='DACs' # "Consumer Secret" con_secret_key=