Re: Python is going to be hard

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 4:23 PM, Rustom Mody wrote: > A patient goes to hospital. The first thing the nurses do (even before the > doctor arrives) is to stick all kinds of tubes into... eyes, nose, ears and > other unmentionable places. The doctor arrives and orders a few more > invasions. > Some

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 10:33:38 AM UTC+5:30, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 2:11 PM, Rustom Mody wrote: > > Is there some PEP filed called "Abolish print in python 4" ? > > I dont remember filing any such... > You screamed "NO PRINT" at us in the voice of Edna Mode. (At lea

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Marko Rauhamaa
Steven D'Aprano : > Marko Rauhamaa wrote: >> That's the classic Boolean algebraic notation. > > Says who? (Apart from you, obviously :-) Since when? I've never seen > it in *any* discussion of Boolean algebra. I have only run into George Boole, Boolean algebra and booleans in engineering textboo

Re: Storing instances using jsonpickle

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 9:39 AM, MRAB wrote: > I occasionally think about a superset of JSON, called, say, "pyson" ... > ah, name already taken! :-( While I'm somewhat sympathetic to the concept, there are some parts of your description that I disagree with. Am I misreading something? Are there ty

Re: Python is going to be hard

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 2:11 PM, Rustom Mody wrote: > Is there some PEP filed called "Abolish print in python 4" ? > I dont remember filing any such... You screamed "NO PRINT" at us in the voice of Edna Mode. (At least, that's how I imagined it being said. YMMV.) > Perhaps you should think of the

Re: Storing instances using jsonpickle

2014-09-03 Thread Sam Raker
1) There are, if you want to mess around with them, ways to make pickle "smarter" about class stuff: https://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances . I've never worked with any of this stuff (and people don't seem to like pickle all that much), and

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 9:37:05 AM UTC+5:30, Ethan Furman wrote: > Ridiculous argument after ridiculous argument. Please do not waste our time > with nonsense. See my answer (3.) to Chris above. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 9:20:02 AM UTC+5:30, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 1:22 PM, Rustom Mody wrote: > > | Effect-free programming > > | -- Function calls have no side effects, facilitating compositional > > reasoning > > | -- Variables are immutable, preventing unexpect

Re: Best way to filter parts of a email.message.Message

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 1:52 PM, Cameron Simpson wrote: > On 03Sep2014 20:59, Tim Chase wrote: >> >> - mime-parts can be nested, so I need to recursively handle them > > > Just to this. IIRC, the MIME part delimiter is supposed to be absolute. That > is, it will not occur in the nested subparts, i

Re: Python is going to be hard

2014-09-03 Thread Ethan Furman
On 09/03/2014 08:22 PM, Rustom Mody wrote: On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: NO PRINT Yes, or the OP could work with actual saved .py files and the reliability that comes from predictable execution e

Re: Best way to filter parts of a email.message.Message

2014-09-03 Thread Cameron Simpson
On 03Sep2014 20:59, Tim Chase wrote: - mime-parts can be nested, so I need to recursively handle them Just to this. IIRC, the MIME part delimiter is supposed to be absolute. That is, it will not occur in the nested subparts, if any. Of course that is no good to you working from outside via

Re: Python is going to be hard

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 1:22 PM, Rustom Mody wrote: > | Effect-free programming > | -- Function calls have no side effects, facilitating compositional reasoning > | -- Variables are immutable, preventing unexpected changes to program data > by other code > | -- Data can be freely aliased or copied

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: > NO PRINT > Yes, or the OP could work with actual saved .py files and the > reliability that comes from predictable execution environments... and > use print. Why

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 7:56:31 AM UTC+5:30, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 12:10 PM, Rustom Mody wrote: > > On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: > >> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: > >> NO PRINT > >> Why are you

Re: Python is going to be hard

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 12:10 PM, Rustom Mody wrote: > On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: >> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: >> NO PRINT > > >> Why are you so dead against print? > > Because it heralds a typical noob code-smell > [espe

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 7:24:19 AM UTC+5:30, Steven D'Aprano wrote: > Marko Rauhamaa wrote: > > Steven D'Aprano: > >> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧ > >> AND)? That's crazy notation. > > That's the classic Boolean algebraic notation. > Says who? (Ap

Re: Storing instances using jsonpickle

2014-09-03 Thread Ned Batchelder
On 9/3/14 6:30 PM, Josh English wrote: On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder wrote: Pickle (and it looks like jsonpickle) does not invoke the class' __init__ method when it reconstitutes objects. Your new __init__ is not being run, so new attributes it defines are no

Re: Python is going to be hard

2014-09-03 Thread Steven D'Aprano
Seymore4Head wrote: > Ok, I understand now that x is actually the first item in the list. > What I want is a loop that goes from 1 to the total number of items in > the list steve. 99% of the time, you don't want that at all. Trust me, iterating over the values in the list is *nearly* always the

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: > NO PRINT > Why are you so dead against print? Because it heralds a typical noob code-smell [especially when the OP admits that BASIC is his background] > Yes,

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 11:54 AM, Steven D'Aprano wrote: > although the > analogy is terrible for ∨. 1+1 = 2, not 1. I wouldn't say terrible. Unclear perhaps, but functional. Try this exercise: false, true = 0, 1 # or use an old Python if true + true: print("true OR true is true") As long as

Best way to filter parts of a email.message.Message

2014-09-03 Thread Tim Chase
I'd like to do something like the following pseudocode existing_message = mailbox[key] # an email.message.Message new_message = email.message.Message() for part in existing_message.walk(): if passes_test(part): new_message.add(part) # need proper call here else: log("skip

Re: Python is going to be hard

2014-09-03 Thread Chris Angelico
On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote: NO PRINT Yes, or the OP could work with actual saved .py files and the reliability that comes from predictable execution environments... and use print. Why are you so dead against print? ChrisA -- https://mail.python.org/mailman/listinfo/

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Steven D'Aprano
Marko Rauhamaa wrote: > Steven D'Aprano : > >> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧ >> AND)? That's crazy notation. > > That's the classic Boolean algebraic notation. Says who? (Apart from you, obviously :-) Since when? I've never seen it in *any* discussion o

Re: Python is going to be hard

2014-09-03 Thread Rustom Mody
On Wednesday, September 3, 2014 11:41:27 PM UTC+5:30, Seymore4Head wrote: > import math > import random > import sys > b=[] > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) > Traceback (most recent call last): > print (steve[x]) > IndexError: list index

Re: Storing instances using jsonpickle

2014-09-03 Thread Denis McMahon
On Thu, 04 Sep 2014 00:39:07 +0100, MRAB wrote: > It would add tuples, delimited by (...), which are not used otherwise > (no expressions): I guess <> and () are both unused as delims by json at present. I like the idea of other key types than string. -- Denis McMahon, denismfmcma...@gmail.com

Re: Storing instances using jsonpickle

2014-09-03 Thread MRAB
On 2014-09-03 23:30, Josh English wrote: On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder wrote: Pickle (and it looks like jsonpickle) does not invoke the class' __init__ method when it reconstitutes objects. Your new __init__ is not being run, so new attributes it defines are

Latest Chess prog

2014-09-03 Thread Chris Hinsley
Latest version of Chess test prog for anyone who might be interested. It does not do en-passon or castling. Best Regards Chris #!/opt/local/bin/pypy -u -tt #!/opt/local/bin/pypy -u -tt -m cProfile # -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Chris Hinsley, GPL V3 License import sys, os,

Re: Storing instances using jsonpickle

2014-09-03 Thread Josh English
On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder wrote: > Pickle (and it looks like jsonpickle) does not invoke the class' > __init__ method when it reconstitutes objects. Your new __init__ is not > being run, so new attributes it defines are not being created. > > This is one o

Re: O'Reilly Python Certification

2014-09-03 Thread Ethan Furman
On 09/03/2014 02:52 PM, jaron.br...@gmail.com wrote: Ethan, Steve, Tim, and others: I'm thinking of taking the program. How long, in hours, does it take to complete all four Python courses? That is an impossible question to answer accurately. I took the classes already having extensive knowl

Re: O'Reilly Python Certification

2014-09-03 Thread jaron . breen
Ethan, Steve, Tim, and others: I'm thinking of taking the program. How long, in hours, does it take to complete all four Python courses? -Jaron Breen On Wednesday, December 15, 2010 12:54:27 PM UTC-5, Ethan Furman wrote: > So I just got an e-mail from O'Reilly and their School of Technology >

Re: Python is going to be hard

2014-09-03 Thread mm0fmf
On 03/09/2014 19:52, Seymore4Head wrote: I see that now. Thanks Maybe some comments in your code would help you? And also posting an on-topic title would help too. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python is going to be hard

2014-09-03 Thread Denis McMahon
On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head wrote: > import math import random import sys b=[] > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) > > Traceback (most recent call last): > File "C:\Functions\blank.py", line 7, in > print (steve[x])

Re: Storing instances using jsonpickle

2014-09-03 Thread Ned Batchelder
On 9/3/14 4:32 PM, Josh English wrote: I am using jsonpickle to store instances of an object into separate data files. If I make any changes to the original class definition of the object, when I recreate my stored instances, they are recreated using the original class definition, so any new a

Storing instances using jsonpickle

2014-09-03 Thread Josh English
I am using jsonpickle to store instances of an object into separate data files. If I make any changes to the original class definition of the object, when I recreate my stored instances, they are recreated using the original class definition, so any new attributes, methods, or properties, are lo

Re: Python is going to be hard

2014-09-03 Thread Ethan Furman
On 09/03/2014 11:41 AM, Seymore4Head wrote: On Wed, 03 Sep 2014 11:33:46 -0700, Ethan Furman wrote: Python will be incredibly hard if you don't read any of the docs or tutorials available. You can't accuse me of that. I have actually read quite a bit. I may not be picking it up, but I am t

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 3 Sep 2014 13:11:51 -0600, Ian Kelly wrote: >On Wed, Sep 3, 2014 at 12:49 PM, Seymore4Head > wrote: >> On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head >> wrote: >> >>>import math >>>import random >>>import sys >>>b=[] >>>steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >>>for x in steve:

Re: Python is going to be hard

2014-09-03 Thread Ian Kelly
On Wed, Sep 3, 2014 at 12:49 PM, Seymore4Head wrote: > On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head > wrote: > >>import math >>import random >>import sys >>b=[] >>steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >>for x in steve: >>print (steve[x]) >> >>Traceback (most recent call last): >>

Re: Python is going to be hard

2014-09-03 Thread Rob Gaddi
On Wed, 03 Sep 2014 11:55:13 -0700 Ethan Furman wrote: > On 09/03/2014 11:49 AM, Seymore4Head wrote: > > On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head > > wrote: > > > >> import math > >> import random > >> import sys > >> b=[] > >> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > >> for x in

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 3 Sep 2014 15:44:47 -0300, Juan Christian wrote: >I'm learning Python using this mailist, and the Tutor mailist, reading the >docs and watching this course, Python Fundamentals ( >http://www.pluralsight.com/training/Courses/TableOfContents/python-fundamentals >). > >Python is really easy

Re: Python is going to be hard

2014-09-03 Thread Ethan Furman
On 09/03/2014 11:49 AM, Seymore4Head wrote: On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head wrote: import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File "C:\Functions\blank.py",

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 3 Sep 2014 13:28:39 -0500, Skip Montanaro wrote: >On Wed, Sep 3, 2014 at 1:24 PM, MRAB wrote: >> Iterating over a list yields its contents, not indexes. > >Unlike in JavaScript. Not sure where the OP is coming from, but that >"feature" of JavaScript threw me when I first encountered it.

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 3 Sep 2014 18:17:27 + (UTC), John Gordon wrote: >In Seymore4Head > writes: > >> import math >> import random >> import sys > >Why are you importing these modules if they're not used? > >> b=[] > >Likewise b is not used. > >> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >> for x in

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 3 Sep 2014 11:19:04 -0700, Rob Gaddi wrote: >On Wed, 03 Sep 2014 14:10:42 -0400 >Seymore4Head wrote: > >> import math >> import random >> import sys >> b=[] >> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >> for x in steve: >> print (steve[x]) >> >> Traceback (most recent call las

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head wrote: >import math >import random >import sys >b=[] >steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >for x in steve: >print (steve[x]) > >Traceback (most recent call last): > File "C:\Functions\blank.py", line 7, in >print (steve[x]) >In

Re: Python is going to be hard

2014-09-03 Thread Juan Christian
I'm learning Python using this mailist, and the Tutor mailist, reading the docs and watching this course, Python Fundamentals ( http://www.pluralsight.com/training/Courses/TableOfContents/python-fundamentals ). Python is really easy and useful, OP don't blame the language because you didn't unders

Re: Python is going to be hard

2014-09-03 Thread Seymore4Head
On Wed, 03 Sep 2014 11:33:46 -0700, Ethan Furman wrote: >On 09/03/2014 11:10 AM, Seymore4Head wrote: >> import math >> import random >> import sys >> b=[] >> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] >> for x in steve: >> print (steve[x]) >> >> Traceback (most recent call last): >>F

Re: Python is going to be hard

2014-09-03 Thread Ethan Furman
On 09/03/2014 11:10 AM, Seymore4Head wrote: import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File "C:\Functions\blank.py", line 7, in print (steve[x]) IndexError: list index

Re: Python is going to be hard

2014-09-03 Thread Skip Montanaro
On Wed, Sep 3, 2014 at 1:24 PM, MRAB wrote: > Iterating over a list yields its contents, not indexes. Unlike in JavaScript. Not sure where the OP is coming from, but that "feature" of JavaScript threw me when I first encountered it. My guess would be that his prior experience includes (at least)

Re: Python is going to be hard

2014-09-03 Thread John Gordon
In Seymore4Head writes: > import math > import random > import sys Why are you importing these modules if they're not used? > b=[] Likewise b is not used. > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) As you step through the loop, x becomes each

Re: Python is going to be hard

2014-09-03 Thread MRAB
On 2014-09-03 19:10, Seymore4Head wrote: import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File "C:\Functions\blank.py", line 7, in print (steve[x]) IndexError: list index out

Re: Python is going to be hard

2014-09-03 Thread Rob Gaddi
On Wed, 03 Sep 2014 14:10:42 -0400 Seymore4Head wrote: > import math > import random > import sys > b=[] > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) > > Traceback (most recent call last): > File "C:\Functions\blank.py", line 7, in > print (ste

Re: Python is going to be hard

2014-09-03 Thread Rock Neurotiko
print(x) :) 2014-09-03 20:10 GMT+02:00 Seymore4Head : > import math > import random > import sys > b=[] > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) > > Traceback (most recent call last): > File "C:\Functions\blank.py", line 7, in > print (ste

Python is going to be hard

2014-09-03 Thread Seymore4Head
import math import random import sys b=[] steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] for x in steve: print (steve[x]) Traceback (most recent call last): File "C:\Functions\blank.py", line 7, in print (steve[x]) IndexError: list index out of range -- https://mail.python.org/mailman/

[ANN] pathlib 1.0.1

2014-09-03 Thread Antoine Pitrou
Hello, I am announcing the release of pathlib 1.0.1. This version makes pathlib Python 2.6-compatible. Note that 2.6 compatibility may not have been as well tested as more recent Python versions (especially on non-Unix platforms). As a reminder, the standalone (PyPI) version of pathlib will no

Re: How to turn a string into a list of integers?

2014-09-03 Thread cl
Peter Otten <__pete...@web.de> wrote: > c...@isbd.net wrote: > > > I know I can get a list of the characters in a string by simply doing:- > > > > listOfCharacters = list("This is a string") > > > > ... but how do I get a list of integers? > > > > >>> [ord(c) for c in "This is a string"] >

Re: crc algorithm

2014-09-03 Thread dream4soul
On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote: > dream4s...@gmail.com wrote: > > > > > calc_crc(b'\x00\x00\x34\x35\x38\x35') > > > > > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35}; > > > > The first two bytes differ; you made an error on the input. Dear Peter,

Re: How to turn a string into a list of integers?

2014-09-03 Thread obedrios
El miércoles, 3 de septiembre de 2014 05:27:29 UTC-7, c...@isbd.net escribió: > I know I can get a list of the characters in a string by simply doing:- > > > > listOfCharacters = list("This is a string") > > > > ... but how do I get a list of integers? > > > > -- > > Chris Green >

Re: How to turn a string into a list of integers?

2014-09-03 Thread Peter Otten
c...@isbd.net wrote: > I know I can get a list of the characters in a string by simply doing:- > > listOfCharacters = list("This is a string") > > ... but how do I get a list of integers? > >>> [ord(c) for c in "This is a string"] [84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 115, 116, 114

How to turn a string into a list of integers?

2014-09-03 Thread cl
I know I can get a list of the characters in a string by simply doing:- listOfCharacters = list("This is a string") ... but how do I get a list of integers? -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: crc algorithm

2014-09-03 Thread dream4soul
On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote: > dream4s...@gmail.com wrote: > > > > > calc_crc(b'\x00\x00\x34\x35\x38\x35') > > > > > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35}; > > > > The first two bytes differ; you made an error on the input. Dear Peter,

AccInABox now has a wiki page (almost)

2014-09-03 Thread Frank Millman
Hi all After putting my AccInABox package up on GitHub and letting a few people know about it, I received the following response - > > From: "Stéfan van der Walt" > > Hi Frank > > It would be great if the readme would list some features of the software > > so that one can decide whether it is

Re: crc algorithm

2014-09-03 Thread Peter Otten
dream4s...@gmail.com wrote: > calc_crc(b'\x00\x00\x34\x35\x38\x35') > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35}; The first two bytes differ; you made an error on the input. -- https://mail.python.org/mailman/listinfo/python-list

Re: crc algorithm

2014-09-03 Thread dream4soul
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote: > dream4s...@gmail.com wrote: > > > > > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote: > > >> dream4s...@gmail.com wrote: > > >> > > >> > > >> > > >> > I have trouble to implement crc algorithm in p

Re: crc algorithm

2014-09-03 Thread dream4soul
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote: > dream4s...@gmail.com wrote: > > > > > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote: > > >> dream4s...@gmail.com wrote: > > >> > > >> > > >> > > >> > I have trouble to implement crc algorithm in p

Re: Editing text with an external editor in Python

2014-09-03 Thread alister
On Tue, 02 Sep 2014 18:45:54 +1000, Chris Angelico wrote: > On Tue, Sep 2, 2014 at 6:35 PM, alister > wrote: >> if edlin is your only option then it would be better to spend you time >> writhing your own text editor! > > Heh! > > Considering how easy it is to deploy a multi-line edit widget in

Re: Raspberry pi, python and robotics

2014-09-03 Thread Gregory Ewing
Rob Gaddi wrote: otherwise getting up and running will cost you a solid $1200 just in gear. While having fancy gear certainly helps, it's not *strictly* necessary. When I first started dabbling in electronics, the most sophisticated piece of equipment I had was an analog multimeter. It got me

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Marko Rauhamaa
Steven D'Aprano : > Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧ > AND)? That's crazy notation. That's the classic Boolean algebraic notation. In basic algebra, the two interesting operations are "addition" and "multiplication". Boolean math works like elementary arithme

Re: crc algorithm

2014-09-03 Thread Mark Lawrence
On 03/09/2014 07:19, dream4s...@gmail.com wrote: Would you please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line paragraphs, thanks. --

Re: I have tried and errored a reasonable amount of times

2014-09-03 Thread Steven D'Aprano
On Tue, 02 Sep 2014 20:14:51 -0700, Rustom Mody wrote: > Dijkstra > used to point out > > A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C) A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C) look > normal enough in this form > > Put then into the way engineers do it and they become A(B + C) = AB + AC > A + BC = (A+B)(A+C) o_O Who

Re: crc algorithm

2014-09-03 Thread Peter Otten
dream4s...@gmail.com wrote: > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote: >> dream4s...@gmail.com wrote: >> >> >> >> > I have trouble to implement crc algorithm in python 3.3 >> >> > >> >> > c version work perfect. I try to use bytes, int and c_types without >> > any