Re: Pygame vector handling?

2013-12-21 Thread Gary Herron
On 12/21/2013 08:24 PM, Downright Trows wrote: I'm trying to pass a vector for the pygame function pygame.transform.rotate The only issue is that this doesn't work and I'm in grade 10 and haven't done the trig unit yet :L Does anyone know a workaround? here is my code if it will help http://p

hi

2013-12-21 Thread Downright Trows
testing -- https://mail.python.org/mailman/listinfo/python-list

Pygame vector handling?

2013-12-21 Thread Downright Trows
I'm trying to pass a vector for the pygame function pygame.transform.rotate The only issue is that this doesn't work and I'm in grade 10 and haven't done the trig unit yet :L Does anyone know a workaround? here is my code if it will help http://pastebin.com/FZQB5eux here is a link to the pygam

fefe

2013-12-21 Thread Downright Trows
fefwfewfwefwe -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Michael Torrie wrote: And you could DIM something with a type, but normally it was the adorning suffix that determined type: A$ is a string, A% is an integer, A! (or A) is float, A# is double. Some versions of 8-bit Microsoft Basic also had a way of overriding the default type for a range of n

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Tim Chase wrote: In know that my first BASIC, Applesoft BASIC had the 2-character names, and you had to load Integer Basic (with Ints in addition to the standard Floats used in the BASIC provided by the ROM, a strange choice). That's not the way I remember it working. Integer Basic provided onl

Re: Why Python is like C++

2013-12-21 Thread Terry Reedy
On 12/21/2013 5:28 PM, Roy Smith wrote: In article , Terry Reedy wrote: On 12/21/2013 10:10 AM, Roy Smith wrote: On the last large C++ project I worked on, we decided (i.e. obeyed a corporate mandate) to start using Coverity's static analysis tool on our 15 year old codebase. I learned a

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Tim Chase wrote: Doh, forgot momentarily that the 6502 had X, Y, and A, making THREE registers. ooh, the luxury of 2-bit naming conventions! :-D Two bits? That's enough to name FOUR registers! We've been cheated! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Christian Gollwitzer wrote: GW-BASIC was a weak language, but two significant characters is definitely too few. I think it was eight. That may have been true for MS-DOS era BASICS. If you have a whopping 640KB for your program, then it doesn't matter so much. The 8-bit era was much more constr

Re: Why Python is like C++

2013-12-21 Thread Roy Smith
In article , Terry Reedy wrote: > On 12/21/2013 10:10 AM, Roy Smith wrote: > > > On the last large C++ project I worked on, we decided (i.e. obeyed a > > corporate mandate) to start using Coverity's static analysis tool on our > > 15 year old codebase. I learned a few things about static analy

Re: Why Python is like C++

2013-12-21 Thread Terry Reedy
On 12/21/2013 10:10 AM, Roy Smith wrote: On the last large C++ project I worked on, we decided (i.e. obeyed a corporate mandate) to start using Coverity's static analysis tool on our 15 year old codebase. I learned a few things about static analysis then. CPython was about that old when Cover

Hopper and Backus (was Re: @property simultaneous setter and getter)

2013-12-21 Thread Terry Reedy
On 12/21/2013 11:59 AM, Dennis Lee Bieber wrote: On 21 Dec 2013 11:31:22 GMT, Steven D'Aprano I don't know. What is it? I'm sure your code is the most fabulous, awesome and brilliant thing since Grace Hopper came up with FORmula TRANslation back in the 1950s, As I recall, Grace Hopper was i

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Gene Heskett
On Saturday 21 December 2013 14:08:02 Chris Angelico did opine: > On Sun, Dec 22, 2013 at 3:54 AM, Dennis Lee Bieber > > wrote: > > (heh, the spell-checker suggests that > > "thefullyqualifiednameontheleftafteranysubexpressionshavebeenevaluated > > isattachedt" should be replaced with "textually

Re: Line based graphic in canvas (vectorgraphic?) scale incorrectly on HDMI monitor.

2013-12-21 Thread jonas . thornvall
Den lördagen den 21:e december 2013 kl. 20:56:54 UTC+1 skrev Ned Batchelder: > On 12/21/13 2:12 PM, jonas.thornv...@gmail.com wrote: > > > Den l�rdagen den 21:e december 2013 kl. 20:03:17 UTC+1 skrev Ned > > Batchelder: > > >> On 12/21/13 1:30 PM, jonas.thornv...@gmail.com wrote: > > >> > >

Re: Line based graphic in canvas (vectorgraphic?) scale incorrectly on HDMI monitor.

2013-12-21 Thread Ned Batchelder
On 12/21/13 2:12 PM, jonas.thornv...@gmail.com wrote: Den lördagen den 21:e december 2013 kl. 20:03:17 UTC+1 skrev Ned Batchelder: On 12/21/13 1:30 PM, jonas.thornv...@gmail.com wrote: Is there a way to make linebased graphic used in canvas scale correct on any monitor? I run in 1920*1

Re: bytearray inconsistencies?

2013-12-21 Thread Mark Lawrence
On 21/12/2013 13:20, Peter Otten wrote: Mark Lawrence wrote: On 21/12/2013 01:58, Ned Batchelder wrote: If you have a zero, you can split on it with: bytestring.split(bytes([0])), but that doesn't explain why find can take a simple zero, and split has to take a bytestring with a zero in it.

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Mark Lawrence
On 21/12/2013 16:54, Dennis Lee Bieber wrote: On 21 Dec 2013 12:58:41 GMT, Steven D'Aprano declaimed the following: On Fri, 20 Dec 2013 16:00:22 +, Mark Lawrence wrote: On 20/12/2013 15:34, rusi wrote: You are also assuming that the two horizontal lines sometimes called 'equals' have

Re: Line based graphic in canvas (vectorgraphic?) scale incorrectly on HDMI monitor.

2013-12-21 Thread jonas . thornvall
Den lördagen den 21:e december 2013 kl. 20:03:17 UTC+1 skrev Ned Batchelder: > On 12/21/13 1:30 PM, jonas.thornv...@gmail.com wrote: > > > Is there a way to make linebased graphic used in canvas scale correct on > > any monitor? > > > > > > I run in 1920*1080 on a Philips TV used as monitor doe

Re: Why Python is like C++

2013-12-21 Thread Gene Heskett
On Saturday 21 December 2013 13:57:37 Tim Chase did opine: > On 2013-12-21 08:43, Tim Chase wrote: > > Then there's the 6502 assembly on that Apple with its 2 user-facing > > registers (plus the Instruction Pointer and Stack Pointer), so I > > guess you could say that it has 1-bit variable names ;

Re: Why Python is like C++

2013-12-21 Thread Chris Angelico
On Sun, Dec 22, 2013 at 2:59 AM, Roy Smith wrote: > In article , > Tim Chase wrote: > >> In know that my first BASIC, Applesoft BASIC had the 2-character >> names, and you had to load Integer Basic (with Ints in addition to the >> standard Floats used in the BASIC provided by the ROM, a strange

Re: Line based graphic in canvas (vectorgraphic?) scale incorrectly on HDMI monitor.

2013-12-21 Thread Ned Batchelder
On 12/21/13 1:30 PM, jonas.thornv...@gmail.com wrote: Is there a way to make linebased graphic used in canvas scale correct on any monitor? I run in 1920*1080 on a Philips TV used as monitor does it matter, lines tend to get longer vertical then horizontal? Strange is i really do not see it w

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Chris Angelico
On Sun, Dec 22, 2013 at 3:54 AM, Dennis Lee Bieber wrote: > (heh, the spell-checker suggests that > "thefullyqualifiednameontheleftafteranysubexpressionshavebeenevaluatedisattachedt" > should be replaced with "textually") The spell-checker was scratching its head and going "I'm pretty sure this i

Line based graphic in canvas (vectorgraphic?) scale incorrectly on HDMI monitor.

2013-12-21 Thread jonas . thornvall
Is there a way to make linebased graphic used in canvas scale correct on any monitor? I run in 1920*1080 on a Philips TV used as monitor does it matter, lines tend to get longer vertical then horizontal? Strange is i really do not see it writing out recangles. -- https://mail.python.org

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 10:59, Roy Smith wrote: > > In know that my first BASIC, Applesoft BASIC had the 2-character > > names, and you had to load Integer Basic (with Ints in addition > > to the standard Floats used in the BASIC provided by the ROM, a > > strange choice). > > Why is it a strange choice?

Re: How to import Wave files into python?

2013-12-21 Thread diesch111
On Wednesday, December 18, 2013 8:45:08 AM UTC-8, twilk...@gmail.com wrote: > How exactly do I import a .wav file and run it? > > also is it possible to run it inside a while loop if so or it just start > playing when its run? - Tom 14 Using Pyside/PyQt you can play wave files this way ... QSoun

Re: Why Python is like C++

2013-12-21 Thread Roy Smith
In article , Tim Chase wrote: > In know that my first BASIC, Applesoft BASIC had the 2-character > names, and you had to load Integer Basic (with Ints in addition to the > standard Floats used in the BASIC provided by the ROM, a strange > choice). Why is it a strange choice? If you're only goi

Re: Why Python is like C++

2013-12-21 Thread Michael Torrie
On 12/21/2013 01:17 AM, Chris Angelico wrote: > GW-BASIC is what you're describing. Q-BASIC isn't the same as > QuickBasic, though. Q-BASIC had subs and functions and stuff, but it > was still, at its heart, BASIC. And you could DIM something with a > type, but normally it was the adorning suffix t

Re: Why Python is like C++

2013-12-21 Thread Roy Smith
In article , Dan Stromberg wrote: > On Fri, Dec 20, 2013 at 9:34 PM, Mark Lawrence > wrote: > > On 20/12/2013 14:19, Roy Smith wrote: > >> > >> http://xkcd.com/1306/ > >> > > > > I believe that to be a very superficial like. They're unlike in that once > > C++ people have compiled their code

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 11:19, Christian Gollwitzer wrote: > GW-BASIC was a weak language, but two significant characters is > definitely too few. I think it was eight. Never used QuickBasic, I > went Turbo Pascal instead, which had 32 significant characters. In know that my first BASIC, Applesoft BASIC ha

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 08:43, Tim Chase wrote: > Then there's the 6502 assembly on that Apple with its 2 user-facing > registers (plus the Instruction Pointer and Stack Pointer), so I > guess you could say that it has 1-bit variable names ;-) Doh, forgot momentarily that the 6502 had X, Y, and A, making TH

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-21 Thread Martin Schöön
Den 2013-12-20 skrev Mark Lawrence : > On 20/12/2013 17:52, Martin Schöön wrote: >> >> Coming from many years of SUN Solaris experience I may be a bit >> spoiled when it comes to robustness :-) >> > > You never had the pleasure of working on VMS then? :) > Only very, very little and I have no clear

Re: bytearray inconsistencies?

2013-12-21 Thread Peter Otten
Mark Lawrence wrote: > On 21/12/2013 01:58, Ned Batchelder wrote: >> >> If you have a zero, you can split on it with: >> bytestring.split(bytes([0])), but that doesn't explain why find can take >> a simple zero, and split has to take a bytestring with a zero in it. >> > > Create a bytearray(range

Re: bytearray inconsistencies?

2013-12-21 Thread Steven D'Aprano
On Sat, 21 Dec 2013 12:29:14 +, Mark Lawrence wrote: > Create a bytearray(range(256)) and partition it on 128. I'd expect to > see the original effectively cut in half with 128 as the separator. You > actually get the original with two empty bytearrays, which makes no > sense to me at all.

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Steven D'Aprano
On Fri, 20 Dec 2013 16:00:22 +, Mark Lawrence wrote: > On 20/12/2013 15:34, rusi wrote: >> You are also assuming that the two horizontal lines sometimes called >> 'equals' have something to do with something called by the same name in >> math -- equations >> >> > A good point. Shall I write

Re: bytearray inconsistencies?

2013-12-21 Thread Mark Lawrence
On 21/12/2013 01:58, Ned Batchelder wrote: If you have a zero, you can split on it with: bytestring.split(bytes([0])), but that doesn't explain why find can take a simple zero, and split has to take a bytestring with a zero in it. Create a bytearray(range(256)) and partition it on 128. I'd e

Re: Why Python is like C++

2013-12-21 Thread Mark Lawrence
On 21/12/2013 11:37, Steven D'Aprano wrote: On Sat, 21 Dec 2013 05:34:51 +, Mark Lawrence wrote: On 20/12/2013 14:19, Roy Smith wrote: http://xkcd.com/1306/ I believe that to be a very superficial like. They're unlike in that once C++ people have compiled their code they can head down

Re: @property simultaneous setter and getter

2013-12-21 Thread Mark Lawrence
On 21/12/2013 11:31, Steven D'Aprano wrote: On Fri, 20 Dec 2013 15:26:10 -0600, Brian Bruggeman wrote: Is this something that would be pep-able? I don't know. What is it? I'm sure your code is the most fabulous, awesome and brilliant thing since Grace Hopper came up with FORmula TRANslation b

Re: @property simultaneous setter and getter

2013-12-21 Thread Devin Jeanpierre
On Sat, Dec 21, 2013 at 2:14 AM, Peter Otten <__pete...@web.de> wrote: > If I were to implement something like this I'd probably use the old trick > with nested functions: > > def getset(f): > funcs = f() > return property(funcs.get("get"), funcs.get("set")) > > class A(object): > @gets

Re: Why Python is like C++

2013-12-21 Thread Steven D'Aprano
On Sat, 21 Dec 2013 00:18:33 -0800, Dan Stromberg wrote: > C++ should use automated tests too, but is often used without because > the compilers make it almost reasonable to do without. For some definition of "reasonable" that I haven't come across before. I'd like to see the compiler that can d

Re: Why Python is like C++

2013-12-21 Thread Steven D'Aprano
On Sat, 21 Dec 2013 05:34:51 +, Mark Lawrence wrote: > On 20/12/2013 14:19, Roy Smith wrote: >> http://xkcd.com/1306/ >> >> > I believe that to be a very superficial like. They're unlike in that > once C++ people have compiled their code they can head down to the pub, Ah, the good ol' "It co

Re: @property simultaneous setter and getter

2013-12-21 Thread Steven D'Aprano
On Fri, 20 Dec 2013 15:26:10 -0600, Brian Bruggeman wrote: > Is this something that would be pep-able? I don't know. What is it? I'm sure your code is the most fabulous, awesome and brilliant thing since Grace Hopper came up with FORmula TRANslation back in the 1950s, but my browser has over ei

Re: Why Python is like C++

2013-12-21 Thread Christian Gollwitzer
Am 21.12.13 09:06, schrieb Gregory Ewing: Michael Torrie wrote: Maybe BASIC's of the 70s. But Not QB. QuickBasic was a pretty impressive compiler in its day. Completely modern, structured language. I may have been thinking of GW-BASIC. There was definitely something that was pretty much an

Re: @property simultaneous setter and getter

2013-12-21 Thread Peter Otten
Brian Bruggeman wrote: > Is this something that would be pep-able? > > https://gist.github.com/brianbruggeman/8061774 There's no need to put such a small piece of code into an external repository. > class someAwesomeClass(object): > """ an example """ > > @property > def some_

@property simultaneous setter and getter

2013-12-21 Thread Brian Bruggeman
Is this something that would be pep-able? https://gist.github.com/brianbruggeman/8061774 Thanks in advance. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python is like C++

2013-12-21 Thread Mark Lawrence
On 21/12/2013 08:18, Dan Stromberg wrote: On Fri, Dec 20, 2013 at 9:34 PM, Mark Lawrence wrote: On 20/12/2013 14:19, Roy Smith wrote: http://xkcd.com/1306/ I believe that to be a very superficial like. They're unlike in that once C++ people have compiled their code they can head down to t

Re: Why Python is like C++

2013-12-21 Thread Dan Stromberg
On Fri, Dec 20, 2013 at 9:34 PM, Mark Lawrence wrote: > On 20/12/2013 14:19, Roy Smith wrote: >> >> http://xkcd.com/1306/ >> > > I believe that to be a very superficial like. They're unlike in that once > C++ people have compiled their code they can head down to the pub, but > Python people have

Re: Why Python is like C++

2013-12-21 Thread Mark Lawrence
On 21/12/2013 08:09, Gregory Ewing wrote: Mark Lawrence wrote: On 20/12/2013 14:19, Roy Smith wrote: http://xkcd.com/1306/ I believe that to be a very superficial like. They're unlike in that once C++ people have compiled their code they can head down to the pub, but Python people have to

Re: Why Python is like C++

2013-12-21 Thread Chris Angelico
On Sat, Dec 21, 2013 at 7:06 PM, Gregory Ewing wrote: > Michael Torrie wrote: >> >> Maybe BASIC's of the 70s. But Not QB. QuickBasic was a pretty >> impressive compiler in its day. Completely modern, structured language. > > > I may have been thinking of GW-BASIC. There was > definitely somethi

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Michael Torrie wrote: Maybe BASIC's of the 70s. But Not QB. QuickBasic was a pretty impressive compiler in its day. Completely modern, structured language. I may have been thinking of GW-BASIC. There was definitely something that was pretty much an old-school BASIC with line numbers, GOSUBS

Re: Why Python is like C++

2013-12-21 Thread Gregory Ewing
Mark Lawrence wrote: On 20/12/2013 14:19, Roy Smith wrote: http://xkcd.com/1306/ I believe that to be a very superficial like. They're unlike in that once C++ people have compiled their code they can head down to the pub, but Python people have to stay at work testing because the compiler

Re: sort(*, key=None, reverse=None)

2013-12-21 Thread Chris Angelico
On Sat, Dec 21, 2013 at 6:59 PM, Mark Lawrence wrote: > Now where was I... Australia! ChrisA [1] http://www.princessbride.8m.com/script.htm -- https://mail.python.org/mailman/listinfo/python-list

Re: sort(*, key=None, reverse=None)

2013-12-21 Thread Mark Lawrence
On 21/12/2013 07:35, Chris Angelico wrote: On Sat, Dec 21, 2013 at 6:24 PM, Mark Lawrence wrote: On 21/12/2013 07:20, Devin Jeanpierre wrote: On Fri, Dec 20, 2013 at 11:16 PM, Mark Lawrence wrote: The subject refers to the list sort method given here http://docs.python.org/3/library/stdtyp