Re: Check if a given value is out of certain range

2015-10-01 Thread alister
On Thu, 01 Oct 2015 18:37:50 +1000, Chris Angelico wrote: > On Thu, Oct 1, 2015 at 6:33 PM, alister > <alister.nospam.w...@ntlworld.com> wrote: >> The recommended phase is Stay calm >> >> Stay: ok dont change anything, whats next >> Calm ok I

Re: Check if a given value is out of certain range

2015-09-30 Thread alister
On Wed, 30 Sep 2015 21:06:02 +0300, Marko Rauhamaa wrote: > Grant Edwards : > >> not (0 <= x <= 10) (I) >> [...] >>(x < 0) or (x > 10) (II) >> [...] >> IMO, (I) is _more_ readable than (II) > > IMO, they're equally readable (except that you should

Re: Check if a given value is out of certain range

2015-09-30 Thread alister
On Tue, 29 Sep 2015 18:44:33 -0500, Tim Chase wrote: > On 2015-09-29 21:32, Mark Lawrence wrote: >> On 29/09/2015 17:48, Rob Gaddi wrote: >> >> Is there any similar elegant way to check if a value is out of >> >> certain range? >> >> Example - To check if x is either less than zero or greater

Re: Question re class variable

2015-09-29 Thread alister
On Tue, 29 Sep 2015 02:27:23 -0700, plewto wrote: > I have a perplexing problem with Python 3 class variables. I wish to > generate an unique ID each time an instance of GameClass is created. > There are two versions of the __gen_id method with test run results for > each listed below the code. >

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread alister
On Thu, 24 Sep 2015 11:45:06 -0700, codywcox wrote: > I seem to be having a problem understanding how arguments and parameters > work, Most likely why my code will not run. > Can anyone elaborate on what I am doing wrong? > > ''' > Cody Cox 9/16/2015 Programming Exercise 1 - Kilometer Converter

Re: A little test for you Guys

2015-09-23 Thread alister
On Wed, 23 Sep 2015 00:56:19 +0100, MRAB wrote: > On 2015-09-23 00:32, Mark Lawrence wrote: >> On 22/09/2015 19:43, Python_Teacher via Python-list wrote: >>> you have 10 minutes Good luck!! >>> >>> >>> 1. What is PEP8 ? >> >> It's the one between PEP7 and PEP9. >> >> >>> 2. What are the

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread alister
On Mon, 21 Sep 2015 12:51:09 -0700, tropical.dude.net wrote: > On Monday, September 21, 2015 at 9:47:33 PM UTC+2, tropical...@gmail.com > wrote: >> On Monday, September 21, 2015 at 9:41:29 PM UTC+2, John Gordon wrote: >> > In <44e870a7-9567-40ba-8a65-d6b52a8c5...@googlegroups.com> >> >

Re: Pyarmor, guard your python scripts

2015-09-18 Thread alister
On Thu, 17 Sep 2015 22:38:32 -0700, Jondy Zhao wrote: > On Friday, September 18, 2015 at 1:02:09 PM UTC+8, Chris Angelico wrote: >> On Fri, Sep 18, 2015 at 12:40 PM, Jondy Zhao >> wrote: >> > The loader only can see the compiled scripts as ast nodes, even if >> > the load

Re: Pyarmor, guard your python scripts

2015-09-18 Thread alister
On Fri, 18 Sep 2015 01:31:50 -0700, Jondy Zhao wrote: > On Friday, September 18, 2015 at 4:08:57 PM UTC+8, alister wrote: >> On Thu, 17 Sep 2015 22:38:32 -0700, Jondy Zhao wrote: >> >> > On Friday, September 18, 2015 at 1:02:09 PM UTC+8, Chris Angelico >> >

Re: pyserial and threads

2015-09-17 Thread alister
On Thu, 17 Sep 2015 11:28:04 +0200, pozz wrote: > I'm trying to create a simple program in Python that opens N serial > ports (through pyserial) and forward every byte received on one of those > ports to the other ports. > > At startup I open the ports and create and start a thread to manage the

Re: True == 1 weirdness

2015-09-17 Thread alister
On Thu, 17 Sep 2015 10:56:07 +0100, Mark Lawrence wrote: > On 17/09/2015 02:33, Steven D'Aprano wrote: >> On Thu, 17 Sep 2015 10:06 am, Mark Lawrence wrote: >> >>> On 16/09/2015 23:15, Sven R. Kunze wrote: On 16.09.2015 23:30, Mark Lawrence wrote: > Barry John art is also art. So, why

Re: Python handles globals badly.

2015-09-10 Thread alister
On Fri, 11 Sep 2015 01:59:27 +1000, Steven D'Aprano wrote: > > Although, I'm not sure that I agree with the idea that "everything is an > expression". I think that's a category mistake, like asking for the > speed of dark[1], or for a bucket of cold. Some things are functional by > nature, and

Re: textfile: copy between 2 keywords

2015-09-10 Thread alister
On Thu, 10 Sep 2015 12:11:55 -0700, wxjmfauth wrote: s = """1, 2, 3, 4 > ... #keyword1 ... 3, 4, 5, 6 ... 2, 3, 4, 5 ... #keyword2 ... 4, 5, 6 > ,7""" s[s.find('keyword1') + len('keyword1'):s.find('keyword2') - 1] > '\n3, 4, 5, 6\n2, 3, 4, 5\n' #or s[s.find('keyword1') +

Re: Hi am new to python

2015-09-09 Thread alister
On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote: > Hi I'm also new to Python but would like to reply. > Like others have stated there is a built in function (sum) that can give > the sum of the elements of a list, but if what you are trying to do is > learn how to use the while command

Re: RPI.GPIO Help

2015-08-20 Thread alister
On Thu, 20 Aug 2015 16:45:53 +0100, MRAB wrote: On 2015-08-20 16:12, John McKenzie wrote: Thanks for the reply. Also, thanks to Laura who replied via email. Tried a bunch of things based off these comments and I always ended up with one of two situations, the channel conflict error,

Re: Pipes

2015-08-09 Thread alister
On Sun, 09 Aug 2015 10:55:36 -0700, rogerh906 wrote: On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: Just learning Python and have a question. Is it possible for Python to pass information to another program (in Windows), wait for that program to finish and then

Re: how to

2015-07-29 Thread alister
On Wed, 29 Jul 2015 11:27:48 -0700, Martin Spasov wrote: Hello, i have been learning python for the past year and i did a few projects. Now i want to step up my game a bit and i want to build a real estate app . Its not going to be commercially released, its just for learning. My idea is

Re: Gmail eats Python

2015-07-26 Thread alister
On Sun, 26 Jul 2015 01:50:21 -0700, Rustom Mody wrote: On Sunday, July 26, 2015 at 2:06:00 PM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody : Emacs 'tries to be everything' in exactly the same way that a 'general purpose programming language' is too general and by pretending to solve all

Re: Integers with leading zeroes

2015-07-24 Thread alister
On Wed, 22 Jul 2015 20:11:47 -0600, Michael Torrie wrote: On 07/22/2015 07:51 AM, Grant Edwards wrote: On 2015-07-22, Ben Finney ben+pyt...@benfinney.id.au wrote: Laura Creighton l...@openend.se writes: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers,

Re: Integers with leading zeroes

2015-07-22 Thread alister
On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. So far, all the examples I've

Re: EuroPython 2015 Keynote: Carrie Anne Philbin

2015-07-01 Thread Alister
On 01/07/15 13:00, M.-A. Lemburg wrote: We are pleased to introduce our next keynote speaker for EuroPython 2015: *Carrie Anne Philbin*. She will be giving her keynote on Thursday, July 23, to start the EuroPython Educational Summit: ***

Re: Pure Python Data Mangling or Encrypting

2015-07-01 Thread alister
On Tue, 30 Jun 2015 23:25:01 +, Jon Ribbens wrote: On 2015-06-30, Steven D'Aprano st...@pearwood.info wrote: I don't think there has been much research into keeping at least *some* security even when keys have been compromised, apart from as it relates to two-factor authentication.

Re: OT ish Blocking telemarketers

2015-06-13 Thread alister
On Fri, 12 Jun 2015 19:47:18 -0600, Michael Torrie wrote: On 06/12/2015 04:20 PM, Seymore4Head wrote: Is there a program what runs on Windows that uses a national blacklist to block phone calls? I'm sure you could install and use the Asterisk PBX software, and I bet people have made

Re: OT ish Blocking telemarketers

2015-06-13 Thread alister
On Sat, 13 Jun 2015 08:53:35 -0600, Michael Torrie wrote: On 06/13/2015 08:42 AM, alister wrote: On Fri, 12 Jun 2015 19:47:18 -0600, Michael Torrie wrote: On 06/12/2015 04:20 PM, Seymore4Head wrote: Is there a program what runs on Windows that uses a national blacklist to block phone calls

Re: Testing random

2015-06-12 Thread alister
On Fri, 12 Jun 2015 23:32:31 +0200, Thomas 'PointedEars' Lahn wrote: Ian Kelly wrote: The probability of 123456789 and 1 are equal. The probability of a sequence containing all nine numbers and a sequence containing only 1s are *not* equal. There is a contradiction in that

Re: How to inverse a particle emitter

2015-06-05 Thread alister
On Thu, 04 Jun 2015 16:15:20 -0700, stephenppraneel7 wrote: hey, i really need help, im a straight up beginner in scripting and i need to figure out how to make an inverted particle emitter using python in maya Some very goo pointers from the Python team

Re: fork/exec close file descriptors

2015-06-03 Thread alister
On Wed, 03 Jun 2015 10:41:44 +0300, Marko Rauhamaa wrote: Alain Ketterlin al...@universite-de-strasbourg.fr.invalid: Marko Rauhamaa ma...@pacujo.net writes: Maybe close() will fail for ever. Your program has to deal with this, something is going wrong, it can't just close and go on.

Re: fork/exec close file descriptors

2015-06-03 Thread alister
On Wed, 03 Jun 2015 15:27:19 +0300, Marko Rauhamaa wrote: alister alister.nospam.w...@ntlworld.com: from the scenario Marco is reporting I get the impression that he is having to interact with a system that is fundamentally flawed from the ground up. Well, yes. It's called linux

Re: fork/exec close file descriptors

2015-06-03 Thread alister
On Wed, 03 Jun 2015 22:07:47 +1000, Steven D'Aprano wrote: On Wed, 3 Jun 2015 07:38 pm, alister wrote: On Wed, 03 Jun 2015 10:41:44 +0300, Marko Rauhamaa wrote: [...] Here's the deal: the child process is saddled with file descriptors it never wanted in the first place. It can't decline

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 grey) and use

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 module

Re: Logic problem: need better logic for desired thruth table.

2015-05-29 Thread alister
On Fri, 29 May 2015 13:48:55 +1000, Chris Angelico wrote: On Fri, May 29, 2015 at 1:20 PM, random...@fastmail.us wrote: The possibility of spelling these with the comparison operators, as some have suggested, is a consequence of Python's implementation where True == 1 and False == 0. In

Re: Help for a newbie regarding code physical switches

2015-05-20 Thread alister
On Wed, 20 May 2015 00:54:40 -0700, Howard Spink wrote: Thanks for your help. I want the python to run automatically after boot and show a blank white screen, when a combination of GP10 inputs are HIGH python displays one of 150 JPEGS. Is this possible? what sort of boot times can I get with

Re: Python 3: yum is dead, long live dnf!

2015-05-18 Thread alister
On Mon, 18 May 2015 15:08:07 +0300, Mihamina Rakotomandimby wrote: On 05/18/2015 01:28 PM, alister wrote: Which may be fitting it just waisted 10 min downloading everything before discovering I did not have permission (forgot to sudo) I think if you resume the transaction, downloaded things

Re: Python 3: yum is dead, long live dnf!

2015-05-18 Thread alister
On Mon, 18 May 2015 11:30:57 +0100, Mark Lawrence wrote: On 18/05/2015 11:18, alister wrote: On Mon, 18 May 2015 15:21:05 +1000, Steven D'Aprano wrote: As part of Red Hat's move to Python 3, yum is officially deprecated and replaced by dnf: http://dnf.baseurl.org/2015/05/11/yum-is-dead

Re: Python 3: yum is dead, long live dnf!

2015-05-18 Thread alister
On Mon, 18 May 2015 15:21:05 +1000, Steven D'Aprano wrote: As part of Red Hat's move to Python 3, yum is officially deprecated and replaced by dnf: http://dnf.baseurl.org/2015/05/11/yum-is-dead-long-live-dnf/ Quote: Yum would not survive the “Python 3 as default” Fedora initiative

Re: Python 3: yum is dead, long live dnf!

2015-05-18 Thread alister
On Mon, 18 May 2015 10:18:49 +, alister wrote: On Mon, 18 May 2015 15:21:05 +1000, Steven D'Aprano wrote: As part of Red Hat's move to Python 3, yum is officially deprecated and replaced by dnf: http://dnf.baseurl.org/2015/05/11/yum-is-dead-long-live-dnf/ Quote: Yum would

Re: l = range(int(1E9))

2015-04-30 Thread alister
On Thu, 30 Apr 2015 20:23:31 +0200, Gisle Vanem wrote: Cecil Westerhof wrote: If I execute: l = range(int(1E9) The python process gobbles up all the memory and is killed. The problem is that after this my swap is completely used, because other processes have swapped to it. This make

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this: awesome_lib/awesome.py awesome_lib/util/__init__.py

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this: awesome_lib/awesome.py awesome_lib/util/__init__.py

Re: Great Math Mystery

2015-04-17 Thread alister
On Fri, 17 Apr 2015 11:47:06 +0200, Fetchinson . wrote: In an altercation with the police, complying with their orders greatly increases your chances of survival. Ah, the definition of a police state: where ordinary people, whether breaking the law or not, are forced by fear of death to obey

Re: New to Python - block grouping (spaces)

2015-04-16 Thread alister
On Wed, 15 Apr 2015 21:07:45 -0700, Blake McBride wrote: Greetings, I am new to Python. I am sorry for beating what is probably a dead horse but I checked the net and couldn't find the answer to my question. I like a lot of what I've seen in Python, however, after 35 years and probably

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread alister
On Thu, 16 Apr 2015 13:07:22 +0200, Antoon Pardon wrote: On 04/16/2015 12:43 PM, Steven D'Aprano wrote: On Thursday 16 April 2015 20:09, Antoon Pardon wrote: I beg to differ. The most common occurence is a loop with a break condition in the middle I would prefer such a loop to be written as

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread alister
On Thu, 16 Apr 2015 14:44:15 +0100, BartC wrote: On 16/04/2015 14:18, alister wrote: On Thu, 16 Apr 2015 13:07:22 +0200, Antoon Pardon wrote: Nobody is argueing for arbitrary indentation. May I suggest that you give it a try for a month, perhaps re-writing a small program you already have

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread alister
On Thu, 16 Apr 2015 16:09:13 +0200, Antoon Pardon wrote: On 04/16/2015 03:18 PM, alister wrote: As is argueing against a real position instead of making something up. Nobody is argueing for arbitrary indentation. May I suggest that you give it a try for a month, perhaps re-writing

Re: New to Python - block grouping (spaces)

2015-04-16 Thread alister
On Thu, 16 Apr 2015 08:01:45 -0700, Blake McBride wrote: As a side note, I bought a few books on Python from Amazon for use on my Kindle. At least one of the books has the formatting for the Kindle messed up rendering the meaning of the program useless. Case in point. Blake A poor

Re: test1

2015-03-26 Thread alister
On Thu, 26 Mar 2015 00:36:49 +, Mark Lawrence wrote: On 26/03/2015 00:17, MRAB wrote: On 2015-03-25 22:36, Chris Angelico wrote: On Thu, Mar 26, 2015 at 6:49 AM, Tiglath Suriol tiglathsur...@gmail.com wrote: Two possibilities: You are a moderator. If you are a moderator you are

Re: test1

2015-03-25 Thread alister
On Wed, 25 Mar 2015 12:49:47 -0700, Tiglath Suriol wrote: On Tuesday, March 24, 2015 at 11:04:48 PM UTC-4, Chris Angelico wrote: On Wed, Mar 25, 2015 at 1:47 PM, Tiglath Suriol wrote: title{% block title %}{% endblock %}/title Looks to me like you're playing around with a templating

Re: test2

2015-03-25 Thread alister
On Wed, 25 Mar 2015 14:22:23 +1100, Chris Angelico wrote: On Wed, Mar 25, 2015 at 2:11 PM, Tiglath Suriol tiglathsur...@gmail.com wrote: # Make this unique, and don't share it with anybody. SECRET_KEY = '42=kv!a-il*!4jamp;7v+0(@a@vq_3j-+ysatta@l6-h63odj2)75' This right here is a reason to

Re: To Change A Pdf Ebook To Kindle

2015-03-24 Thread alister
On Tue, 24 Mar 2015 00:05:46 -0700, jeffreyciross wrote: PDF Converter for Mac is a fantastic and easyto-use instrument for converting PDF documents on Macos. Macintosh PDF Converter can pdf to excel converter to Word, Shine, PowerPoint, EPUB, Text format for Mac. With PDF Converter Mac, the

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread alister
On Fri, 06 Mar 2015 14:23:22 +1100, Ben Finney wrote: No. I'm saying that it's clear the person saying “get their panties all up in a bunch” fully intends to convey specifically *female* underwear, and thereby to use implied femininity as an insult. Yes, of course I know some people who

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread alister
On Fri, 06 Mar 2015 08:31:40 +, Mark Lawrence wrote: On 06/03/2015 08:00, Rustom Mody wrote: On Thursday, March 5, 2015 at 10:49:54 AM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody: You keep talking of accent. At first I thought you were using the word figuratively or else joking. Im

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-03 Thread alister
On Tue, 03 Mar 2015 03:00:30 -0800, Rustom Mody wrote: I dont understand what you are saying. Lets say you replace 'conservative' by something more definitively pejorative eg fundamentalist, backward etc Now replace 'American society' by 'Nazi Germany' finally we can call Godwins on this

Re: Python Worst Practices

2015-03-02 Thread alister
On Sun, 01 Mar 2015 20:14:13 -0800, Rustom Mody wrote: On Sunday, March 1, 2015 at 10:32:00 PM UTC+5:30, Marko Rauhamaa wrote: Mark Lawrence : Are you suggesting that we Brits have a single home accent? If you are, you need to stand up as your voice is rather muffled. That by the way

Re: Python Worst Practices

2015-03-02 Thread alister
On Mon, 02 Mar 2015 14:19:45 +0200, Marko Rauhamaa wrote: alister alister.nospam.w...@ntlworld.com: or as another analogy why don't you (Marco) try telling a Barber in Seville that he should be speaking Latin Spanish not that strange variation he uses? If the barber conference language

Re: date

2015-03-02 Thread alister
On Tue, 03 Mar 2015 02:51:28 +1100, Chris Angelico wrote: On Tue, Mar 3, 2015 at 2:24 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 02/03/2015 14:44, Steven D'Aprano wrote: Mark Lawrence wrote: Give me the Steven D'Aprano solution any day of the week. Sounds ominous. Is that

Re: Python Worst Practices

2015-03-02 Thread alister
On Mon, 02 Mar 2015 08:25:40 -0800, Travis Griggs wrote: seems like the very smallest of our worries. There is no egg in eggplant What the blood heck is eggplant? oh wait you mean aubergine this page is clearly about American English. We are even more obtuse, it stops Johnnie Foreigner

Re: Python Worst Practices

2015-03-01 Thread alister
On Mon, 02 Mar 2015 07:26:22 +1100, Chris Angelico wrote: On Mon, Mar 2, 2015 at 7:16 AM, alister alister.nospam.w...@ntlworld.com wrote: Last time I was is the USA I had a local ask me which state London was in! (heck I know they only bother with their own history but I though we played

Re: Python Worst Practices

2015-03-01 Thread alister
On Sun, 01 Mar 2015 18:16:05 +0200, Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Marko Rauhamaa wrote: Learn it like everybody else has to. Stockholm Syndrome :-) I learned English, and so everyone else should too. No, the point is that if everybody else

Re: Newbie question about text encoding

2015-02-27 Thread alister
On Sat, 28 Feb 2015 03:12:16 +1100, Chris Angelico wrote: On Sat, Feb 28, 2015 at 3:00 AM, alister alister.nospam.w...@ntlworld.com wrote: I think there is a case for bringing back the overlay file, or at least loading larger programs in sections only loading the routines

Re: Newbie question about text encoding

2015-02-27 Thread alister
On Sat, 28 Feb 2015 01:22:15 +1100, Chris Angelico wrote: If you're trying to use the pagefile/swapfile as if it's more memory (I have 256MB of memory, but 10GB of swap space, so that's 10GB of memory!), then yes, these performance considerations are huge. But suppose you need to run a

Re: Newbie question about text encoding

2015-02-27 Thread alister
On Fri, 27 Feb 2015 19:14:00 +, MRAB wrote: I suppose you could load the basic parts first so that the user can start working, and then load the additional features in the background. quite possible my opinion on this is very fluid it may work for some applications, it probably wouldn't

Re: Newbie question about text encoding

2015-02-27 Thread alister
On Sat, 28 Feb 2015 04:45:04 +1100, Chris Angelico wrote: Perhaps, but on the other hand, the skill of squeezing code into less memory is being replaced by other skills. We can write code that takes the simple/dumb approach, let it use an entire megabyte of memory, and not care about the

Re: Python Worst Practices

2015-02-26 Thread alister
On Wed, 25 Feb 2015 23:34:29 +, MRAB wrote: On 2015-02-25 22:59, Joel Goldstick wrote: On Wed, Feb 25, 2015 at 4:28 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 2015-02-25 20:45, Mark Lawrence wrote: http://www.slideshare.net/pydanny/python-worst-practices Any that

Re: Bug in timsort!?

2015-02-25 Thread alister
On Wed, 25 Feb 2015 14:58:31 +0100, Sturla Molden wrote: On 24/02/15 22:34, Roy Smith wrote: http://envisage-project.eu/proving-android-java-and-python-sorting- algorithm-is-broken-and-how-to-fix-it/ This is awful. It is broken for arrays longer than 2**49 elements. With 8 bytes per

Re: Concatenate list values

2015-02-23 Thread alister
On Mon, 23 Feb 2015 07:58:39 -0800, loial wrote: Is there a quick way to concatenate all the values in a list into a string, except the first value? I want this to work with variable length lists. All values in list will be strings. Any help appreciated ''.join(mylist[1:]) all

Re: Group by interval time

2015-02-12 Thread alister
On Thu, 12 Feb 2015 04:34:03 -0800, charles.sartori wrote: Hello there! I`m trying to group by a list of Row() objects in 12days interval and sum(). values. Here is an example of the list [Row(time=datetime.datetime(2013, 1, 1, 0, 0), sum=4676557380615), Row(time=datetime.datetime(2013,

Re: Wildly OT: pop-up virtual keyboard for Mac or Linux?

2015-02-11 Thread alister
On Tue, 10 Feb 2015 23:15:11 +0100, Laura Creighton wrote: In a message of Tue, 10 Feb 2015 15:29:00 -0600, Tim Chase writes: While it's not exactly a hold-down-get-a-menu, I opt for changing my (otherwise-useless) caps-lock key to an X compose key: $ setxkbmap -option compose:caps I can

Re: Downloading videos (in flash applications) using python

2015-02-03 Thread alister
On Mon, 02 Feb 2015 15:21:07 -0800, Gabriel Ferreira wrote: Mark Lawrence wrote: I don't actually know, but could you please provide some context and write in plain English, those damn ... things are extremely annoying. Hi, Mark. I am developing a research project, which includes

Re: Python is DOOMED! Again!

2015-01-24 Thread alister
Of course we don't have $1/3 dollar coins, but I do have a pair of tin-snips and can easily cut a $1 coin into three equal pieces. wow you have just given a physical demonstration of integer Maths $1 /3 =$0 as the coin is now worthless ;-) Either that, or make up change with 20¢, 10¢ and

Re: Random ALL CAPS posts on this group

2015-01-24 Thread alister
On Fri, 23 Jan 2015 14:40:15 -0800, sohcahtoa82 wrote: On Monday, January 19, 2015 at 4:16:13 PM UTC-8, Luke Tomaneng wrote: Has anyone noticed these? There have been about three of them recently and they don't seem to have anything to do with Python at all. Does anyone know if there is a

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread alister
On Sat, 17 Jan 2015 21:33:19 +1100, Steven D'Aprano wrote: Gregory Ewing wrote: Marko Rauhamaa wrote: Gregory Ewing greg.ew...@canterbury.ac.nz: If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. Not since Python3. Characters are Unicode now so you'll need to

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread alister
On Sat, 17 Jan 2015 19:08:21 +, Dan Sommers wrote: On Sat, 17 Jan 2015 18:44:42 +, Grant Edwards wrote: ... somebody who only knows how to write C++ [though he can do it in several different languages]. +1 QOTW (brilliant phrases in other threads are off topic and are

Re: Python 3 regex?

2015-01-14 Thread alister
On Wed, 14 Jan 2015 14:02:27 +0100, Thomas 'PointedEars' Lahn wrote: wxjmfa...@gmail.com wrote: Le mardi 13 janvier 2015 03:53:43 UTC+1, Rick Johnson a écrit : [...] you should find Python's text processing Nirvana [...] I recommend, you write a small application I recommend you get

Re: Calling a derived class's constructor from a parent method

2015-01-14 Thread alister
On Wed, 14 Jan 2015 17:05:27 +, Mark Lawrence wrote: On 14/01/2015 16:45, jason wrote: If I have a class hierarchy like so: class A(object): def __init__(self, s): self.s = s def foo(self, s): return A(s) class B(A): def

Re: Python 3 regex?

2015-01-13 Thread alister
On Tue, 13 Jan 2015 04:36:38 +, Steven D'Aprano wrote: On Mon, 12 Jan 2015 19:48:18 +, Ian wrote: My recommendation would be to write a recursive decent parser for your files. That way will be easier to write, I know that writing parsers is a solved problem in computer science,

Re: Decimals and other numbers

2015-01-10 Thread alister
On Fri, 09 Jan 2015 19:57:20 -0800, Devin Jeanpierre wrote: On Fri, Jan 9, 2015 at 7:05 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: It's far from clear what *anything* multiplied by itself zero times should be. A better way of thinking about what x**n for integer n means is this:

Re: Announce: PyPrimes 0.2.1a

2015-01-09 Thread alister
On Fri, 09 Jan 2015 11:50:26 +1100, Chris Angelico wrote: On Fri, Jan 9, 2015 at 11:41 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: oh, pip did the wrong thing again? you can fix that by standing on one leg, sacrificing a goat to the Great Old Dark Ones, deleting these

Re: Announce: PyPrimes 0.2.1a

2015-01-09 Thread alister
On Fri, 09 Jan 2015 22:01:38 +1100, Ben Finney wrote: alister alister.nospam.w...@ntlworld.com writes: why not simply cheat call it V 0.2.3 :-) it is not as if there is any regulation concerning what can cannot constitute a minor release it is all at your own discretion

Re: Hello World

2015-01-08 Thread alister
On Thu, 08 Jan 2015 16:31:22 +0200, Marko Rauhamaa wrote: alister alister.nospam.w...@ntlworld.com: On Thu, 08 Jan 2015 16:06:16 +0200, Marko Rauhamaa wrote: An administrator doesn't need the users' passwords for anything but should be assumed to know them. The administrator may be able

Re: Hello World

2015-01-08 Thread alister
On Thu, 08 Jan 2015 16:06:16 +0200, Marko Rauhamaa wrote: Chris Angelico ros...@gmail.com: With sudo, you get MUCH finer control. I can grant some user the power to run sudo eject sr0, but no other commands. I can permit someone to execute any of a large number of commands, all individually

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-26 Thread alister
On Fri, 26 Dec 2014 15:13:25 +1100, Steven D'Aprano wrote: Deep in the brain, well underneath the level of modern languages and consciousness, there is a deeper machine language of the brain. If you can write instructions in this machine language, you can control people's brains. Back in

Re: Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-24 Thread alister
On Wed, 24 Dec 2014 13:23:34 +1100, Steven D'Aprano wrote: alister wrote: for the same reason a pet hate of mine is a memo sent as an attached document when it could simply have been the body of the text. And then the attached document (a Word doc, naturally) simply says Please see some

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-24 Thread alister
On Tue, 23 Dec 2014 16:20:10 +, Grant Edwards wrote: On 2014-12-23, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Chris Angelico wrote: On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith r...@panix.com wrote: If I really didn't trust something, I'd go to AWS and spin up one of

Re: what is wrong with d.clear()?

2014-12-23 Thread alister
On Tue, 23 Dec 2014 15:15:03 -0500, Dave Angel wrote: On 12/23/2014 07:59 AM, shawool wrote: Thank you for answering my query. Fonts and colors are reset to defaults now. Sorry for the inconvenience caused. Regards, Shawool The following is a piece of your message: div

Re: Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-23 Thread alister
On Wed, 24 Dec 2014 08:31:44 +1100, Ben Finney wrote: alister alister.nospam.w...@ntlworld.com writes: Sometime I have to switch to HTML @ work but even then only when I want to send someone a screen shot I've been able to attach images to plain text messages without any trouble. Why

Re: what is wrong with d.clear()?

2014-12-23 Thread alister
On Wed, 24 Dec 2014 09:31:12 +1100, Chris Angelico wrote: On Wed, Dec 24, 2014 at 8:08 AM, alister alister.nospam.w...@ntlworld.com wrote: Sometime I have to switch to HTML @ work but even then only when I want to send someone a screen shot Attachments don't work? ChrisA not with some

Re: Hello World

2014-12-22 Thread alister
On Mon, 22 Dec 2014 16:18:33 +, Grant Edwards wrote: On 2014-12-21, Tony the Tiger tony@tiger.invalid wrote: On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: I am in total awe. I'm not. It has no real value. Write your code like that and you'll soon be looking for a new job.

Re: Hello World

2014-12-20 Thread alister
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: Taken from Ben Kurtovic's blog: http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html (lambda _, __, ___, , _, __, ___, : getattr( __import__(True.__class__.__name__[_] +

Re: Python script isn't producing text in data file

2014-12-11 Thread alister
On Thu, 11 Dec 2014 05:19:44 +, Grant Edwards wrote: On 2014-12-11, Docfxit docf...@gmail.com wrote: I am happy to paste it into a post. The reason I didn't is because it's very large. The Python script is 1239 lines long. The example summary is 105 lines long. The input log is 6810

Re: Python script isn't producing text in data file

2014-12-11 Thread alister
On Wed, 10 Dec 2014 20:23:56 -0800, Docfxit wrote: On Wednesday, December 10, 2014 7:55:17 PM UTC-8, Ben Finney wrote: Docfxit docf...@gmail.com writes: I am happy to paste it into a post. The reason I didn't is because it's very large. The Python script is 1239 lines long. That's

Re: why can't download file from linux server into local window disk c:

2014-12-09 Thread alister
To: Luuk On Mon, 08 Dec 2014 19:11:40 +0100, Luuk wrote: On 8-12-2014 18:37, ishish wrote: with open(localpath, 'wb') as fl: PermissionError: [Errno 13] Permission denied: 'c:' I remember gloomily (haven't used windows since ages) that newer Windows versions don't like users to write

Re: why can't download file from linux server into local window disk c:?

2014-12-08 Thread alister
On Mon, 08 Dec 2014 19:11:40 +0100, Luuk wrote: On 8-12-2014 18:37, ishish wrote: with open(localpath, 'wb') as fl: PermissionError: [Errno 13] Permission denied: 'c:' I remember gloomily (haven't used windows since ages) that newer Windows versions don't like users to write directly to

Re: Python handles globals badly.

2014-12-04 Thread alister
On Thu, 04 Dec 2014 00:02:25 +0100, Skybuck Flying wrote: Mark Lawrence wrote in message news:mailman.16534.1417610132.18130.python-l...@python.org... On 03/12/2014 02:27, Skybuck Flying wrote: Excuse is: bad programming style. I don't need snot telling me how to program after 20 years

Re: Fwd: Need Help

2014-12-01 Thread alister
On Mon, 01 Dec 2014 18:41:27 +0530, Ezhilarasan Chandrasekar wrote: Hi Guys, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the final result of

Re: I love assert

2014-11-27 Thread alister
On Thu, 27 Nov 2014 01:22:37 -0800, TP wrote: On Tue, Nov 11, 2014 at 11:40 AM, Peter Cacioppi peter.cacio...@gmail.com wrote: I get the impression that most Pythonistas aren't as habituated with assert statements as I am. Is that just a misimpression on my part? If not, is there a good

Re: Quotation Ugliness

2014-11-26 Thread alister
On Wed, 26 Nov 2014 10:02:57 -0600, Tim Daneliuk wrote: On 11/26/2014 10:00 AM, random...@fastmail.us wrote: On Wed, Nov 26, 2014, at 10:55, Tim Daneliuk wrote: Nope. Password only exist in memory locally. How does it send it to the remote sudo? Over paramiko transport (ssh) and then

Re: How to access Qt components loaded from file?

2014-11-21 Thread alister
On Thu, 20 Nov 2014 22:41:02 +, Juan Christian wrote: On Thu Nov 20 2014 at 8:20:29 PM alister alister.nospam.w...@ntlworld.com wrote: Then either do the necessary work (you have just proven you can)or find a better way of communicating with this news group(NNTP or the mailing list

Re: Using Python for date calculations

2014-11-21 Thread alister
On Fri, 21 Nov 2014 12:15:03 +0200, Steve Hayes wrote: On Fri, 21 Nov 2014 19:40:22 +1100, Chris Angelico ros...@gmail.com wrote: On Fri, Nov 21, 2014 at 7:35 PM, Steve Hayes hayes...@telkomsa.net wrote: This Python script does it for me. year = input(Year: ) age = input(Age: ) born =

Re: Using Python for date calculations

2014-11-21 Thread alister
On Fri, 21 Nov 2014 10:20:06 +, Mark Lawrence wrote: On 21/11/2014 08:50, Gary Herron wrote: On 11/21/2014 12:35 AM, Steve Hayes wrote: I've finally found a use for Python. When, in the course of my genealogy research, I look at census or burial records, I often want to work out a

<    1   2   3   4   5   6   7   8   >