Re: Where is 'palindrome' defined?

2015-06-01 Thread David Palao
Hi, Because "palindrome" != "parlindrome"? Have you read the error message? Did you try to understand it? Best 2015-06-01 6:46 GMT+02:00 fl : > Hi, > > When I search solution of reverse a string/number, I came across a short > function online: > def palindrome(num): > return str(num)

Re: Where is 'palindrome' defined?

2015-06-01 Thread Larry Hudson via Python-list
On 05/31/2015 09:46 PM, fl wrote: Hi, When I search solution of reverse a string/number, I came across a short function online: def palindrome(num): return str(num) == str(num)[::-1] I thought that it is a general function. And with the following variable: a '1234_' parlindr

Re: Where is 'palindrome' defined?

2015-06-01 Thread Omar Abou Mrad
On Mon, Jun 1, 2015 at 7:46 AM, fl wrote: > Hi, > > When I search solution of reverse a string/number, I came across a short > function online: > > >>> def palindrome(num): > return str(num) == str(num)[::-1] > > I thought that it is a general function. And with the following variable: >

Re: Using Python instead of Bash

2015-06-01 Thread Laura Creighton
On Sun, 31 May 2015 19:06:40 +0200, Cecil Westerhof wrote: >> >>By the way: because of the lpr my script only works on Linux (and >>probably Unix and Apple). Can I rewrite it in such a way that it also >>works with Windows? Someone else has to test it then, because I do not >>have a Windows comput

[ANN] pyspread 0.4.3

2015-06-01 Thread Martin Manns
== pyspread 0.4.3 == Pyspread 0.4.3 is released. Please note that pyspread 0.4.2 is not available on pypi because of a deployment issue. Major changes to 0.4.1: * Full screen mode added * Some changes to improve results on Debian CI tests * Updates to first steps docu

A simple print cannot run in Python Shell

2015-06-01 Thread fl
Hi, When I try the following (They are saved in a main.py file) #!/usr/bin/python print r'C:\\nowhere' It works as the tutorial, i.e. it echoes in a Windows 7 command console: C:\\nowhere When I run the following command in a Python 2.7.9 Shell on Windows 7, print r'C:\\nowhere'

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
If you are giving a talk about Decimal -- and trying to stamp out the inappropriate use of floats you have to first inform people that what they learned as 'decimals' as children was not floating point, despite the fact that we write them the same way. If I ever get the time machine, I am going ba

Re: A simple print cannot run in Python Shell

2015-06-01 Thread Jussi Piitulainen
fl writes: > When I run the following command in a Python 2.7.9 Shell on Windows 7, > > print r'C:\\nowhere' > > It has error: > print r'C:\\nowhere' > SyntaxError: invalid syntax > > What is the problem? Why does it behave different at .py file > and Python Shell? Have you executed the foll

Re: Using Python instead of Bash

2015-06-01 Thread Larry Hudson via Python-list
On 05/31/2015 05:42 AM, Cecil Westerhof wrote: I help someone that has problems reading. For this I take photo's of text, use convert from ImageMagick to make a good contrast (original paper is grey) and use lpr to print it a little bigger. I''m wondering why you bother to take a photo, which th

Re: Using Python instead of Bash

2015-06-01 Thread Jussi Piitulainen
Larry Hudson writes: > On 05/31/2015 05:42 AM, Cecil Westerhof wrote: >> I help someone that has problems reading. For this I take photo's of >> text, use convert from ImageMagick to make a good contrast (original >> paper is grey) and use lpr to print it a little bigger. >> > I''m wondering why y

Re: A simple print cannot run in Python Shell

2015-06-01 Thread Steven D'Aprano
On Monday 01 June 2015 17:50, fl wrote: > Hi, > > When I try the following (They are saved in a main.py file) > > #!/usr/bin/python > print r'C:\\nowhere' Aside: Don't use raw strings for file names. They aren't intended for file names, and while they will *usually* work, some day you will try

Re: A simple print cannot run in Python Shell

2015-06-01 Thread Tim Golden
On 01/06/2015 09:30, Steven D'Aprano wrote: > How do you run it in Windows 7? The hashbang line > > #!/usr/bin/python > > is for Linux and Unix, and won't work on Windows. So you must be doing > something to execute the file. What is that? Actually, it will for anywhere with a recent Python

Re: Using Python instead of Bash

2015-06-01 Thread alister
On Mon, 01 Jun 2015 11:06:33 +0300, Jussi Piitulainen wrote: > Larry Hudson writes: > >> On 05/31/2015 05:42 AM, Cecil Westerhof wrote: >>> I help someone that has problems reading. For this I take photo's of >>> text, use convert from ImageMagick to make a good contrast (original >>> paper is gr

Re: Where is 'palindrome' defined?

2015-06-01 Thread Marko Rauhamaa
David Palao : > Because "palindrome" != "parlindrome"? > Have you read the error message? Did you try to understand it? When you are starting with any new thing, even the simplest problems look baffling. Once you have achieved a few successes, such error messages start to make sense. > def p

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 09:56 CEST schreef Larry Hudson: > On 05/31/2015 05:42 AM, Cecil Westerhof wrote: >> I help someone that has problems reading. For this I take photo's >> of text, use convert from ImageMagick to make a good contrast >> (original paper is grey) and use lpr to print it a little

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Marko Rauhamaa
Laura Creighton : > It is really hard to get the concept of Decimal across to people who > already have that concept in their mind, but think it is called Float. I can't remember running into this frustration. However, I *constantly* run into engineers who don't understand what zero means. Mar

Re: Using Python instead of Bash

2015-06-01 Thread Marko Rauhamaa
Cecil Westerhof : > I am amazed about the technical progress: I did not know it was > possible to take a screen-shot from a booklet. Well, take a look at this video that demonstrates the possibilities of the technology: https://www.youtube.com/watch?v=MOXQo7nURs0 Marko -- https://mail.pyth

Re: Where is 'palindrome' defined?

2015-06-01 Thread David Palao
2015-06-01 11:21 GMT+02:00 Marko Rauhamaa : > David Palao : > >> Because "palindrome" != "parlindrome"? >> Have you read the error message? Did you try to understand it? > > When you are starting with any new thing, even the simplest problems > look baffling. Once you have achieved a few successes,

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Chris Angelico
On Mon, Jun 1, 2015 at 5:58 PM, Laura Creighton wrote: > If you are giving a talk about Decimal -- and trying to stamp out the > inappropriate use of floats you have to first inform people that > what they learned as 'decimals' as children was not floating point, > despite the fact that we write t

Re: Best way to prevent zombie processes

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 03:03 CEST schreef Cameron Simpson: > On 31May2015 23:33, Cecil Westerhof wrote: >> At the moment I have the following code: >> os.chdir(directory) >> for document in documents: >> subprocess.Popen(['evince', document]) >> >> With this I can open several documents at once. Bu

Re: Best way to prevent zombie processes

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 00:22 CEST schreef Marko Rauhamaa: > Cecil Westerhof : > >> At the moment I have the following code: >> os.chdir(directory) >> for document in documents: >> subprocess.Popen(['evince', document]) >> >> With this I can open several documents at once. But there is no way >> to k

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 02:53 CEST schreef Dennis Lee Bieber: > On Sun, 31 May 2015 19:06:40 +0200, Cecil Westerhof > declaimed the following: > >> >> By the way: because of the lpr my script only works on Linux (and >> probably Unix and Apple). Can I rewrite it in such a way that it >> also works w

Re: Best way to prevent zombie processes

2015-06-01 Thread Chris Angelico
On Mon, Jun 1, 2015 at 7:20 PM, Cecil Westerhof wrote: > But > what if I want for certain Popen signals SIG_IGN and others SIG_DFL. > How should I do that? You can't. A signal is a signal; you can't specify default handling for some and not others. The only way is to actually handle them, and the

Re: Best way to prevent zombie processes

2015-06-01 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Jun 1, 2015 at 7:20 PM, Cecil Westerhof wrote: >> But >> what if I want for certain Popen signals SIG_IGN and others SIG_DFL. >> How should I do that? > > You can't. A signal is a signal; you can't specify default handling > for some and not others. The only way is to a

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 19:45:31 +1000, Chris Angelico writes: >On Mon, Jun 1, 2015 at 5:58 PM, Laura Creighton wrote: >> If you are giving a talk about Decimal -- and trying to stamp out the >> inappropriate use of floats you have to first inform people that >> what they learned as 'deci

Re: Best way to prevent zombie processes

2015-06-01 Thread Marko Rauhamaa
Cecil Westerhof : > It works. What I find kind of strange because > https://docs.python.org/2/library/signal.html You should not rely on Python documentation on Linux system specifics. The wait(2) manual page states: POSIX.1-2001 specifies that if the disposition of SIGCHLD is set to

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Mark Lawrence
On 01/06/2015 08:58, Laura Creighton wrote: If you are giving a talk about Decimal -- and trying to stamp out the inappropriate use of floats you have to first inform people that what they learned as 'decimals' as children was not floating point, despite the fact that we write them the same way.

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Chris Angelico
On Mon, Jun 1, 2015 at 8:28 PM, Laura Creighton wrote: > You have missed my point. What I want is for floats never to be > represented as '.' or ',' notation. That way, when each naive > user writes his or her first program that deals with money, when > they look at their computer manual they wi

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Dave Farrance
Laura Creighton wrote: >If you are giving a talk about Decimal -- and trying to stamp out the >inappropriate use of floats you have to first inform people that >what they learned as 'decimals' as children was not floating point, >despite the fact that we write them the same way. ... To be fair,

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Marko Rauhamaa
Dave Farrance : Decimal('0.3') > Decimal('0.3') Decimal(0.3) > Decimal('0.299988897769753748434595763683319091796875') At first I thought I had never dealt with money in Python nor made use of Decimal. Then I remembered I *did* deal with money in one program and wondered how

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 11:34:08 +0100, Mark Lawrence writes: >In the wonderful world of numbers I believe that things are looking up. > I don't recall a new issue on the bug tracker for several months along >the lines of "Python can't do arithmetic properly". How Great to Hear! Bu

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 11:07 CEST schreef alister: > On Mon, 01 Jun 2015 11:06:33 +0300, Jussi Piitulainen wrote: > >> Larry Hudson writes: >> >>> On 05/31/2015 05:42 AM, Cecil Westerhof wrote: I help someone that has problems reading. For this I take photo's of text, use convert from Imag

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 20:36:14 +1000, Chris Angelico writes: >The problem isn't the decimal separator, though, because floats can >have problems even without it (and can have no problems with a decimal >separator). If you want to distinguish "computer numbers" from "real >numbers", you'd

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-01 Thread MRAB
On 2015-06-01 05:37, Larry Hastings wrote: On behalf of the Python development community and the Python 3.5 release team, I'm relieved to announce the availability of Python 3.5.0b2. Python 3.5.0b1 had a major regression (see http://bugs.python.org/issue24285 for more information) and as such w

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Marko Rauhamaa
Laura Creighton : > Von Neumann recommended against floating-point numbers for the 1951 > IAS machine, arguing that fixed-point arithmetic is preferable. I > agree, but, if John von Neumann couldn't win that argument, then there > is no way on earth I could. So, if floating point is going in, at >

Re: Everything is an object in python - object class and type class

2015-06-01 Thread Eddilbert Macharia
Thank you all who have taken there time to assist me. Special thanks to Steven D'Aparo even though you didn't have two you have taken you time to go into details. I think i kind of understand now. Instead of python having data types like int, string, e.t.c it has two primitive types which are

Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Steven D'Aprano
On Mon, 1 Jun 2015 07:36 pm, Marko Rauhamaa wrote: > However, I constantly run into engineers who don't understand what > zero means. Okay, I'll bite. What does zero mean, and how do engineers misunderstand it? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread BartC
On 01/06/2015 12:24, Laura Creighton wrote: Maybe _your_ brain needs some resetting, too. :) You know too much so have lost the grasp of how the world looks to the new programmer. Maybe the new programmer should learn then that binary floating point might not perform as they might expect.

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread MRAB
On 2015-06-01 12:57, Marko Rauhamaa wrote: Laura Creighton : Von Neumann recommended against floating-point numbers for the 1951 IAS machine, arguing that fixed-point arithmetic is preferable. I agree, but, if John von Neumann couldn't win that argument, then there is no way on earth I could. S

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread BartC
On 01/06/2015 12:57, Marko Rauhamaa wrote: Laura Creighton : Von Neumann recommended against floating-point numbers for the 1951 IAS machine, arguing that fixed-point arithmetic is preferable. I agree, but, if John von Neumann couldn't win that argument, then there is no way on earth I could. S

Re: Best way to prevent zombie processes

2015-06-01 Thread Cecil Westerhof
Op Sunday 31 May 2015 23:33 CEST schreef Cecil Westerhof: > At the moment I have the following code: > os.chdir(directory) > for document in documents: > subprocess.Popen(['evince', document]) > > With this I can open several documents at once. But there is no way > to know when those documents ar

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 22:07:41 +1000, "Steven D'Aprano" writes: >On Mon, 1 Jun 2015 07:36 pm, Marko Rauhamaa wrote: > >> However, I constantly run into engineers who don't understand what >> zero means. > >Okay, I'll bite. > >What does zero mean, and how do engineers misunderstand it? >

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Dave Farrance
Steven D'Aprano wrote: >On Mon, 1 Jun 2015 07:36 pm, Marko Rauhamaa wrote: > >> However, I constantly run into engineers who don't understand what >> zero means. > >Okay, I'll bite. > >What does zero mean, and how do engineers misunderstand it? There are two hard things in computer science: cach

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Skip Montanaro
On Mon, Jun 1, 2015 at 7:56 AM, Dave Farrance < [email protected]> wrote: > There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. So it's 1 that engineers really don't understand? Just add 1 and you get the correct number of

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Marko Rauhamaa
Steven D'Aprano : > What does zero mean, and how do engineers misunderstand it? Off the top of my head: * Code that does: if elements: for element in elements: ... instead of: for elements in elements: ... * C++ insists that all objects have

ANN: polynice 0.8 - a nice(1) like utility for throttling processes

2015-06-01 Thread garabik-news-2005-05
polynice is a nice(1)-like command line utility for unix systems to throttle long running processes beyond what can be achieved by nice(1), by repeatedly suspending and resuming the process. It is written for python3, though there is some python2.6 & 2.7 compatibility. Author: Radovan Garabík UR

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Ben Bacarisse
Laura Creighton writes: > In a message of Mon, 01 Jun 2015 19:45:31 +1000, Chris Angelico writes: >>On Mon, Jun 1, 2015 at 5:58 PM, Laura Creighton wrote: >>> If you are giving a talk about Decimal -- and trying to stamp out the >>> inappropriate use of floats you have to first inform people tha

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread random832
On Mon, Jun 1, 2015, at 09:18, Marko Rauhamaa wrote: > if elements: > for element in elements: > ... > >instead of: > > for elements in elements: TypeError: 'NoneType' object is not iterable -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to prevent zombie processes

2015-06-01 Thread Marko Rauhamaa
Cecil Westerhof : > Thread(target = p.wait).start() > > [...] > > How about this way of solving it? It works. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Chris Angelico
On Mon, Jun 1, 2015 at 9:24 PM, Laura Creighton wrote: > In a message of Mon, 01 Jun 2015 20:36:14 +1000, Chris Angelico writes: >>The problem isn't the decimal separator, though, because floats can >>have problems even without it (and can have no problems with a decimal >>separator). If you want

Re: Best way to prevent zombie processes

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 14:16 CEST schreef Cecil Westerhof: > Op Sunday 31 May 2015 23:33 CEST schreef Cecil Westerhof: > >> At the moment I have the following code: >> os.chdir(directory) >> for document in documents: >> subprocess.Popen(['evince', document]) >> >> With this I can open several docum

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Gene Heskett
On Monday 01 June 2015 07:24:52 Laura Creighton wrote: > In a message of Mon, 01 Jun 2015 20:36:14 +1000, Chris Angelico writes: > >The problem isn't the decimal separator, though, because floats can > >have problems even without it (and can have no problems with a > > decimal separator). If you wa

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Dave Farrance
Skip Montanaro wrote: >P.S., Dave, your "omitthis" and "andthis" kind of sucks for the rest of us. >And I just invalidated your attempts at >obscurity by replying to your correct email address. I suggest you just >omit that stuff going forward. Unfortunately, >I now I have a crap address in my Gm

Re: Using Python instead of Bash

2015-06-01 Thread Grant Edwards
On 2015-05-31, Cecil Westerhof wrote: > I help someone that has problems reading. For this I take photo's of > text, use convert from ImageMagick to make a good contrast (original > paper is grey) and use lpr to print it a little bigger. > > Normally I would implement this in Bash, but I thought

Re: Best way to prevent zombie processes

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 15:32 CEST schreef Marko Rauhamaa: > Cecil Westerhof : > >> Thread(target = p.wait).start() >> >> [...] >> >> How about this way of solving it? > > It works. That I knew: I tested it before I posted it. What I mend is this better, worse, or the same as working with signal. In

Re: Best way to prevent zombie processes

2015-06-01 Thread Grant Edwards
On 2015-05-31, Marko Rauhamaa wrote: > Cecil Westerhof : > >> At the moment I have the following code: >> os.chdir(directory) >> for document in documents: >> subprocess.Popen(['evince', document]) >> >> With this I can open several documents at once. But there is no way to >> know

Re: Where is 'palindrome' defined?

2015-06-01 Thread Grant Edwards
On 2015-06-01, Gary Herron wrote: > On 05/31/2015 09:46 PM, fl wrote: >> Hi, >> >> When I search solution of reverse a string/number, I came across a short >> function online: >> > def palindrome(num): >> return str(num) == str(num)[::-1] >> >> I thought that it is a general function. And

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 14:57:02 +0300, Marko Rauhamaa writes: >In 1951, decimal numbers would have done little good in the UK with the >pound divided into 20 shillings and the shilling into 12 pence. Maybe a >"Babylonian" module would have been perfect. > > >Marko You are being facetious

EuroPython 2015: Conference Dinner and Party

2015-06-01 Thread M.-A. Lemburg
We all know that good food, drinks and music are essential for a perfect EuroPython conference and so we’ve arranged a nice cocktail dinner with local food and a party for the evening on Wednesday, July 22nd. *** EuroPython Conference Dinner and Party *** https://ep2015.europy

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread BartC
On 01/06/2015 14:52, Chris Angelico wrote: > It's like the eternal debate about assignment and whether "x = x + 1" is nonsense, with advocates preferring "x := x + 1" as being somehow fundamentally different. It isn't. It's just a notational change, and not even a huge one. (Though I do see the l

Re: Where is 'palindrome' defined?

2015-06-01 Thread Denis McMahon
On Sun, 31 May 2015 21:46:31 -0700, fl wrote: def palindrome(num): Note carefully the spelling(1): palindrome parlindrome(a) Note carefully the spelling(2): parlindrome > NameError: name 'parlindrome' is not defined Compare carefully spelling(1) and spelling(2). palindrome is defin

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread alister
On Mon, 01 Jun 2015 17:07:18 +0200, Laura Creighton wrote: > In a message of Mon, 01 Jun 2015 14:57:02 +0300, Marko Rauhamaa writes: >>In 1951, decimal numbers would have done little good in the UK with the >>pound divided into 20 shillings and the shilling into 12 pence. Maybe a >>"Babylonian" mo

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Denis McMahon
On Fri, 29 May 2015 09:01:55 -0700, Mike Driscoll wrote: > I've been asked on several occasions to write about intermediate or > advanced topics in Python and I was wondering what the community > considers to be "intermediate" or "advanced". I realize we're all > growing in our abilities with the

Re: Best way to prevent zombie processes

2015-06-01 Thread Marko Rauhamaa
Grant Edwards : > On 2015-05-31, Marko Rauhamaa wrote: >> If you don't care to know when child processes exit, you can simply >> ignore the SIGCHLD signal: >> >> import signal >> signal.signal(signal.SIGCHLD, signal.SIG_IGN) >> >> That will prevent zombies from appearing. > > Bravo! I've

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread BartC
On 01/06/2015 16:07, Laura Creighton wrote: In a message of Mon, 01 Jun 2015 14:57:02 +0300, Marko Rauhamaa writes: In 1951, decimal numbers would have done little good in the UK with the pound divided into 20 shillings and the shilling into 12 pence. Maybe a "Babylonian" module would have been

Re: Using Python instead of Bash

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 12:44:34 +0200, Cecil Westerhof writes: >Also the funny thing is that I first scanned it. But it gave several >problems. One of them was that it is a format between A4 and A5. >Taking pictures is faster and gives better results. > >-- >Cecil Westerhof >Senior Softw

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 15:26:49 -, alister writes: >I don't think anyone programmed a Sinclair computer to use pre-decimal >currency, we converted to decimal in 1971 (although the last pre-decimal >coin did not go out of use untill 1993) Interesting. Somebody sent me one that supp

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Chris Angelico
On Tue, Jun 2, 2015 at 1:17 AM, BartC wrote: > On 01/06/2015 14:52, Chris Angelico wrote: >> It's >> >> like the eternal debate about assignment and whether "x = x + 1" is >> nonsense, with advocates preferring "x := x + 1" as being somehow >> fundamentally different. It isn't. It's just a notatio

lotto number generator

2015-06-01 Thread gm
Hi. I am new to python so am still in learning phase. I was thinking to make one program that will print out all possible combinations of 10 pairs. I think this is a good way for something "bigger" :-). This is how this looks like: 1.) 1 2 2.) 1 2 3.) 1 2 4.) 1 2 5.) 1 2 6.) 1 2 7.) 1 2 8.)

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Grant Edwards
On 2015-06-01, BartC wrote: > At one time the choice was integer or floating point in many languages, > unless you were specifically using a business language such as Cobol. My recollection in the early days of home computers is that many BASIC implementations had BCD floating point instead of

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread MRAB
On 2015-06-01 16:51, Laura Creighton wrote: In a message of Mon, 01 Jun 2015 15:26:49 -, alister writes: I don't think anyone programmed a Sinclair computer to use pre-decimal currency, we converted to decimal in 1971 (although the last pre-decimal coin did not go out of use untill 1993) I

Re: lotto number generator

2015-06-01 Thread Grant Edwards
On 2015-06-01, gm wrote: > I was thinking to make one program that will print out all possible > combinations of 10 pairs. [...] > What would be the best way to make something like this? > Maybe some tutorial ? https://www.google.com/search?q=python+combinations -- Grant Edwards

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 17:44 CEST schreef Laura Creighton: > In a message of Mon, 01 Jun 2015 12:44:34 +0200, Cecil Westerhof > writes: >> Also the funny thing is that I first scanned it. But it gave >> several problems. One of them was that it is a format between A4 >> and A5. Taking pictures is fa

Re: lotto number generator

2015-06-01 Thread Ian Kelly
On Mon, Jun 1, 2015 at 10:23 AM, gm wrote: > Hi. > I am new to python so am still in learning phase. > > I was thinking to make one program that will print out all possible > combinations of 10 pairs. I think this is a good way for something "bigger" > :-). > > This is how this looks like: > > 1.)

Re: lotto number generator

2015-06-01 Thread Ian Kelly
On Mon, Jun 1, 2015 at 11:13 AM, Ian Kelly wrote: > On Mon, Jun 1, 2015 at 10:23 AM, gm wrote: >> Hi. >> I am new to python so am still in learning phase. >> >> I was thinking to make one program that will print out all possible >> combinations of 10 pairs. I think this is a good way for somethin

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Marko Rauhamaa
MRAB : > 1971 was also the year we started the switch over to the metric > system. It was going to be done gradually over a 10-year period. It's > still a work in progress... Same here in Finland. Minutes, hours and degrees persist as do calories, teaspoons and carats. Marko -- https://mail.py

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Mark Lawrence
On 01/06/2015 14:14, Skip Montanaro wrote: Maybe you should just install a decent spam filter or switch to Gmail, which has a functioning spam filter (unlike Yahoo...) Okay I'll bite, what's wrong with the Yahoo spam filter? -- My fellow Pythonistas, ask not what

replace parens update

2015-06-01 Thread Littlefield, Tyler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all: I've put a new version here: https://dl.dropboxusercontent.com/u/10204868/replace_parens.py It's for me, a lot easier to understand. It uses regex to replace parens rather than using a state machine and conforms to the python standards for

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Mark Lawrence
On 01/06/2015 18:02, Grant Edwards wrote: On 2015-06-01, BartC wrote: At one time the choice was integer or floating point in many languages, unless you were specifically using a business language such as Cobol. My recollection in the early days of home computers is that many BASIC implement

Somebody is trying to install python

2015-06-01 Thread Laura Creighton
The person who is being told that their processor is incompatible is back. But replied to me, not the list. reply to: https://mail.python.org/pipermail/python-list/2015-May/691557.html Laura --- Forwarded Message Return-Path: From: "David Skardon" To: "Laura Creighton" References: <414E2

Re: What is considered an "advanced" topic in Python?

2015-06-01 Thread Grant Edwards
On 2015-06-01, Mark Lawrence wrote: > On 01/06/2015 18:02, Grant Edwards wrote: >> On 2015-06-01, BartC wrote: >> >>> At one time the choice was integer or floating point in many languages, >>> unless you were specifically using a business language such as Cobol. >> >> My recollection in the earl

Re: Using Python instead of Bash

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 18:44:01 +0200, Cecil Westerhof writes: >Op Monday 1 Jun 2015 17:44 CEST schreef Laura Creighton: > >> In a message of Mon, 01 Jun 2015 12:44:34 +0200, Cecil Westerhof >> writes: >>> Also the funny thing is that I first scanned it. But it gave >>> several problems.

Re: Somebody is trying to install python

2015-06-01 Thread Chris Angelico
On Tue, Jun 2, 2015 at 4:16 AM, Laura Creighton wrote: > trying to install a binary, opp system windows xp tried python 2 and three > both failed said incompatible processor, my pc is 1 year old with an AMD > 6200 6 core processor > thanks > Dave Hi David! Do you know what edition of Windows you

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 20:42 CEST schreef Laura Creighton: > In a message of Mon, 01 Jun 2015 18:44:01 +0200, Cecil Westerhof > writes: >> Op Monday 1 Jun 2015 17:44 CEST schreef Laura Creighton: >> >>> In a message of Mon, 01 Jun 2015 12:44:34 +0200, Cecil Westerhof >>> writes: Also the funny

super

2015-06-01 Thread TheDoctor
Missive #02441: super() If you're going to use object composition, creating a super (no pun intended) class, you are forming an explicit object hierarchy (unlike mix-in style). In this case, if the method exists in the parent class, you shouldn't give the user (or subclass) the choice of call

Re: Using Python instead of Bash

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 21:57:05 +0200, Cecil Westerhof writes: >> Truly? That's (very close to) 7 inch by 9 inch, 177.8 mm x 228.6 mm >> and 7 by 9 is what pre-metric Britian called 'Small Post Quarto'. >> I wonder if this merely a coincidence, or does some software really >> still like

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-01 Thread Terry Reedy
On 6/1/2015 7:48 AM, MRAB wrote: I've just run "Windows x86 executable installer" and "Windows x86-64 executable installer". While installing, the progress messages overwrote each other without clearing the background each time. I saw something like that too. Can you open a tracker issue wit

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-01 Thread Zachary Ware
On Mon, Jun 1, 2015 at 3:57 PM, Terry Reedy wrote: > On 6/1/2015 7:48 AM, MRAB wrote: > >> I've just run "Windows x86 executable installer" and "Windows x86-64 >> executable installer". >> >> While installing, the progress messages overwrote each other without >> clearing the background each time.

Re: Everything is an object in python - object class and type class

2015-06-01 Thread vern . muhr
On Sunday, May 31, 2015 at 7:34:20 AM UTC-7, Eddilbert Macharia wrote: > Hello All , > > I'm wrecking my head trying to understand. where the class object comes into > play . > > Is it only meant to act as base class and does it mean there is an actual > class called object in python which all

Re: Zero [was Re: What is considered an "advanced" topic in Python?]

2015-06-01 Thread Terry Reedy
On 6/1/2015 9:14 AM, Skip Montanaro wrote: remove. Maybe you should just install a decent spam filter or switch to Gmail, which has a functioning spam filter (unlike Yahoo...) For me, Yahoo's spam filter is comparable to Gmail's. (My udel account is actually handl

Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)' So how would I create a virtual environment using the venv module that has a Python 2.7 binary? tia g

Re: Using a particular python binary with venv

2015-06-01 Thread Ian Kelly
On Mon, Jun 1, 2015 at 3:33 PM, wrote: > According to this https://docs.python.org/3.4/library/venv.html#module-venv > 'Each virtual environment has its own Python binary (allowing creation of > environments with various Python versions)' > So how would I create a virtual environment using the

Re: Using a particular python binary with venv

2015-06-01 Thread Carl Meyer
On 06/01/2015 03:33 PM, [email protected] wrote: > According to this > https://docs.python.org/3.4/library/venv.html#module-venv 'Each > virtual environment has its own Python binary (allowing creation of > environments with various Python versions)' > > So how would I create a virtual e

Re: Using a particular python binary with venv

2015-06-01 Thread Laura Creighton
In a message of Mon, 01 Jun 2015 14:33:56 -0700, [email protected] writ es: >According to this https://docs.python.org/3.4/library/venv.html#module-venv >'Each virtual environment has its own Python binary (allowing creation of >environments with various Python versions)' >So how would I

Pyton re module and POSIX equivalence classes

2015-06-01 Thread Tim Chase
Is Python supposed to support POSIX "equivalence classes"? I tried the following in Py2 and Py3: >>> re.sub('[[=a=]]', 'A', 'aáàãâä', re.U) 'aáàãâä' which suggests that it doesn't (I would have expected "AA" as the result). Is there a way to get this behavior? I found that perl knows a

Re: Using Python instead of Bash

2015-06-01 Thread Cecil Westerhof
Op Monday 1 Jun 2015 22:42 CEST schreef Laura Creighton: > In a message of Mon, 01 Jun 2015 21:57:05 +0200, Cecil Westerhof > writes: >>> Truly? That's (very close to) 7 inch by 9 inch, 177.8 mm x 228.6 >>> mm and 7 by 9 is what pre-metric Britian called 'Small Post >>> Quarto'. I wonder if this m

Re: Language design

2015-06-01 Thread TheDoctor
On Wednesday, September 11, 2013 at 6:40:22 PM UTC-5, Steven D'Aprano wrote: > On Wed, 11 Sep 2013 14:30:54 -0700, Mark Janssen wrote: > > > 1) It tried to make Object the parent of every class. > > Tried, and succeeded. Oh? How about: class superdict(dict): """I'm going to extend the

Re: Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
On Tuesday, 2 June 2015 09:43:37 UTC+12, Carl Meyer wrote: > On 06/01/2015 03:33 PM, orotau wrote: > > According to this > > https://docs.python.org/3.4/library/venv.html#module-venv 'Each > > virtual environment has its own Python binary (allowing creation of > > environments with various Pyth

Re: Using a particular python binary with venv

2015-06-01 Thread Carl Meyer
On 06/01/2015 04:07 PM, [email protected] wrote: > On Tuesday, 2 June 2015 09:43:37 UTC+12, Carl Meyer wrote: >> On 06/01/2015 03:33 PM, orotau wrote: >>> According to this >>> https://docs.python.org/3.4/library/venv.html#module-venv 'Each >>> virtual environment has its own Python bina

Re: Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
http://bugs.python.org/issue24356 -- https://mail.python.org/mailman/listinfo/python-list

  1   2   >