Subscribe to get an answer vs automatic CC Was: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread anatoly techtonik
On Wed, May 27, 2015 at 3:57 PM, Laura Creighton wrote: > Chris Angelico apparantly has a problem with cc'd people who aren't > on the list. I thought that CC in this case works automatically? If that's not the case, then I'll be annoyed by this too. So, thanks for CCing. =) Also, https://mail.p

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 4:18 PM, Stefan Behnel wrote: >> Lua's a much weaker language than Python is, though. Can it handle >> arbitrary-precision integers? Unicode? Dare I even ask, >> arbitrary-precision rationals (fractions.Fraction)? > > All of those and way more, as long as you use it embedde

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread anatoly techtonik
On Wed, May 27, 2015 at 3:57 PM, Laura Creighton wrote: > --- Forwarded Message > > Return-Path: > Received: from mail.python.org (mail.python.org [82.94.164.166]) > by theraft.openend.se (8.14.4/8.14.4/Debian-4) with ESMTP id > t4RC09ap02From: Chris Angelico > Cc: "python-list@pyth

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 6:05 PM, anatoly techtonik wrote: >> On Wed, May 27, 2015 at 9:52 PM, anatoly techtonik >> wrote: >>> And the short answer is that we need unicode because we are printing this >>> information to the stdout, and stdout is opened in text mode at least on >>> Windows, and wi

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Laura Creighton
In a message of Fri, 29 May 2015 11:05:07 +0300, anatoly techtonik writes: >Added Mailman to my suxx tracker: >https://github.com/techtonik/suxx-tracker#mailman You are damning the wrong piece of software -- this is not a problem with mailman; mailman doesn't care at all what software you use to

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Stefan Behnel
Chris Angelico schrieb am 29.05.2015 um 09:41: > On Fri, May 29, 2015 at 4:18 PM, Stefan Behnel wrote: >>> Lua's a much weaker language than Python is, though. Can it handle >>> arbitrary-precision integers? Unicode? Dare I even ask, >>> arbitrary-precision rationals (fractions.Fraction)? >> >> All

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 7:23 PM, Stefan Behnel wrote: > Chris Angelico schrieb am 29.05.2015 um 09:41: >> On Fri, May 29, 2015 at 4:18 PM, Stefan Behnel wrote: Lua's a much weaker language than Python is, though. Can it handle arbitrary-precision integers? Unicode? Dare I even ask,

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread anatoly techtonik
On Fri, May 29, 2015 at 11:41 AM, Laura Creighton wrote: > In a message of Fri, 29 May 2015 11:05:07 +0300, anatoly techtonik writes: > >>Added Mailman to my suxx tracker: >>https://github.com/techtonik/suxx-tracker#mailman > > You are damning the wrong piece of software -- this is not a problem >

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Laura Creighton
In a message of Fri, 29 May 2015 19:38:21 +1000, Chris Angelico writes: >The point was to sandbox something inside Python. Otherwise, yes, just >write it in Python. But if you do have to sandbox like this, you lose >language-level Unicode support, language-level arbitrary precision >integers, etcet

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Laura Creighton
In a message of Thu, 28 May 2015 23:07:42 -0700, Ned Deily writes: >It would be helpful to know what utility it is that is encountering the >fatal error; that message is not familiar and I suspect it is coming >from trying to run some third-party application. It may be that the >application was

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Ian Kelly
On Fri, May 29, 2015 at 2:05 AM, anatoly techtonik wrote: > Added Mailman to my suxx tracker: > https://github.com/techtonik/suxx-tracker#mailman What a useless tool. Instead of tiredly complaining that things suck, why not take some initiative to make them better? I'm curious about your complai

stdout of child process as an input of another thread in Python?

2015-05-29 Thread Kevin Peterson
Hi, I want to use the stdout of child process as an input of another thread, but some how I am not able to read the stdout. Using Popen I have created a child process and stdout of it I have redirected to PIPE (because I don't want that to be printed on with my main process). Now using this

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Mark Lawrence
On 29/05/2015 11:02, Ian Kelly wrote: On Fri, May 29, 2015 at 2:05 AM, anatoly techtonik wrote: Added Mailman to my suxx tracker: https://github.com/techtonik/suxx-tracker#mailman What a useless tool. Instead of tiredly complaining that things suck, why not take some initiative to make them b

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Jon Ribbens
On 2015-05-29, Ian Kelly wrote: > On Fri, May 29, 2015 at 2:05 AM, anatoly techtonik > wrote: >> Added Mailman to my suxx tracker: >> https://github.com/techtonik/suxx-tracker#mailman > > What a useless tool. Instead of tiredly complaining that things suck, > why not take some initiative to make

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

2015-05-29 Thread Tim Chase
On 2015-05-29 13:48, Chris Angelico wrote: > That said, though, using 0 for False and 1 for True is easily > the most common convention in use today, and the next most likely > case is that comparing booleans would give a simple and immediate > error. So it's most likely to be safe to do. There ar

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Laura Creighton
Do you know about the codecs module? reading http://pymotw.com/2/codecs/ may be useful if this is new to you. Have you read https://www.python.org/dev/peps/pep-0293/ ? Will backslashreplace do what you want? Laura -- https://mail.python.org/mailman/listinfo/python-list

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, 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 other languages boo

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

2015-05-29 Thread random832
On Thu, May 28, 2015, at 23:49, Skybuck Flying wrote: > Ok thanks for this information. > > I was just wondering how many thruth table combinations there can be for > a > typical thruth table with 2 inputs and 1 output. > > Since there are 2 inputs, this means 4 possible outputs, which means 2 t

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

2015-05-29 Thread random832
On Thu, May 28, 2015, at 23:48, Chris Angelico wrote: > On Fri, May 29, 2015 at 1:20 PM, 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 other languages bool

python

2015-05-29 Thread David Skardon
Absolute rubbish tried all ways to run python keeps saying processor isn't compatible, I have a 6 core 6200 amd processor, so how does one install this program and get its minute brain to operate regards Dave --- This email has been checked for viruses by Avast antivirus software. http://www.av

Re: python

2015-05-29 Thread Laura Creighton
In a message of Fri, 29 May 2015 13:42:27 +0100, "David Skardon" writes: >Absolute rubbish tried all ways to run python keeps saying processor isn't >compatible, I have a 6 core 6200 amd processor, so how does one install this >program and get its minute brain to operate >regards >Dave We need m

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Cem Karan
On May 28, 2015, at 11:47 PM, Laura Creighton wrote: > webmas...@python.org just got some mail from some poor embarrased > soul who ran this program and broke their Python install. > > They are running Mac OSX 10.7.5 > > They are getting: > > Utility has encountered a fatal error, and wil

Re: python

2015-05-29 Thread Steven D'Aprano
On Fri, 29 May 2015 10:42 pm, David Skardon wrote: > Absolute rubbish tried all ways to run python keeps saying processor isn't > compatible, I have a 6 core 6200 amd processor, so how does one install > this program and get its minute brain to operate regards Dave Clearly a genius like yourself

Inverted Comma Search

2015-05-29 Thread subhabrata . banerji
Dear Group, I am trying to implement two searches, inverted comma search and search within brackets. I am trying to implement them in Whoosh, but not finding good tutorial or examples. If any one may kindly help me with. Regards, Subhabrata Banerjee. -- https://mail.python.org/mailman/listinf

Re: Inverted Comma Search

2015-05-29 Thread Laura Creighton
In a message of Fri, 29 May 2015 06:41:49 -0700, subhabrata.bane...@gmail.com w rites: >Dear Group, > >I am trying to implement two searches, inverted comma search and search within >brackets. I am trying to implement them in Whoosh, but not finding good >tutorial or examples. If any one may kind

Is it possible to find python34.lib from within Python?

2015-05-29 Thread Paul Moore
I want to set up a script to build some C code. I need to link it with python34.lib, but I'm not sure how to locate that file without hard-coding it. There doesn't seem to be a sysconfig path I can use - best ways I can think of for finding it in a way that works even if I'm in a virtualenv is:

Re: Accessing DataSocket Server with Python

2015-05-29 Thread William Ray Wing
> On May 28, 2015, at 6:17 PM, Dan Stromberg wrote: > > I have no idea about the protocol used by NI DataSockets, but you > might be able to reverse engineer the protocol by using the official > client with a sniffer. > > Also, be aware that TCP/IP guarantees that you get the correct data in >

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread anatoly techtonik
On Fri, May 29, 2015 at 2:39 PM, Laura Creighton wrote: > Do you know about the codecs module? > > reading http://pymotw.com/2/codecs/ may be useful if this is new to you. Does that work for Python 2 and Python 3? > Have you read https://www.python.org/dev/peps/pep-0293/ ? No. > Will backslash

Re: OpenCV with Python (cv or cv2)

2015-05-29 Thread Markos
Hi Laura, I will follow your advice and install Debian 8.0. I was postponing this upgrade. :^) I just find that Jessie is the new stable release. According to the tutorial: http://milq.github.io/install-opencv-ubuntu-debian/ the simplest way to install opencv in jessie is: apt-get install

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 11:37 PM, William Ray Wing wrote: >> On May 28, 2015, at 6:17 PM, Dan Stromberg wrote: >> >> I have no idea about the protocol used by NI DataSockets, but you >> might be able to reverse engineer the protocol by using the official >> client with a sniffer. >> >> Also, be a

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

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 8:53 PM, Tim Chase wrote: > On 2015-05-29 13:48, Chris Angelico wrote: >> That said, though, using 0 for False and 1 for True is easily >> the most common convention in use today, and the next most likely >> case is that comparing booleans would give a simple and immediate

Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

2015-05-29 Thread Ian Kelly
On Fri, May 29, 2015 at 4:44 AM, Jon Ribbens wrote: > On 2015-05-29, Ian Kelly wrote: >> On Fri, May 29, 2015 at 2:05 AM, anatoly techtonik >> wrote: >>> Added Mailman to my suxx tracker: >>> https://github.com/techtonik/suxx-tracker#mailman >> >> What a useless tool. Instead of tiredly complai

Re: OpenCV with Python (cv or cv2)

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 12:29 AM, Markos wrote: > the simplest way to install opencv in jessie is: > > apt-get install python-dev libopencv-opencv > > And from what I saw the opencv package available in the repository is 2.4.9 > > https://packages.debian.org/jessie/python-opencv > > And from what

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread William Ray Wing
> On May 29, 2015, at 9:12 AM, Cem Karan wrote: > > > On May 28, 2015, at 11:47 PM, Laura Creighton wrote: > >> webmas...@python.org just got some mail from some poor embarrased >> soul who ran this program and broke their Python install. >> >> They are running Mac OSX 10.7.5 >> >> They are

Re:

2015-05-29 Thread Mario R. Osorio
?Quien es Usted y por que pregunta? Dtb/Gby === Mario R. Osorio “If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford On Fri, May 29, 2015 at 1:33 AM, Laura Creighton wrote: > Sabe usted acerca de estas páginas? > https://mail.python.org/mailman/lis

What is considered an "advanced" topic in Python?

2015-05-29 Thread Mike Driscoll
Hi, 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 language, so this is going to be very subjective, but I am

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

2015-05-29 Thread Joel Goldstick
Maybe itertools or generators On Fri, May 29, 2015 at 12:01 PM, Mike Driscoll wrote: > Hi, > > 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 a

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

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 2:01 AM, 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: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article <201505290959.t4t9xpdk016...@fido.openend.se>, Laura Creighton wrote: > I asked her to come here, but I fear she is feeling a tad too > embarassed to do that right now. I don't know how to find out > the name of the Utility -- the Error message really does say > 'Utility' -- with no n

Re: Is it possible to find python34.lib from within Python?

2015-05-29 Thread Ned Deily
In article <68710660-0f24-403a-8c3d-996c06a26...@googlegroups.com>, Paul Moore wrote: > I want to set up a script to build some C code. I need to link it with > python34.lib, but I'm not sure how to locate that file without hard-coding > it. [...] If you are embedding Python, refer to the "Ex

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Grant Edwards
On 2015-05-29, William Ray Wing wrote: > While that’s certainly possible in a routed network (and even then > can be overridden with the “do not fragment” bit), it won’t happen in > a LAN or self-contained instrument set-up. You don't know that. > These days, even routed networks tend to delive

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

2015-05-29 Thread Skip Montanaro
On Fri, May 29, 2015 at 11:01 AM, Mike Driscoll wrote: > ... I was wondering what the community considers to be "intermediate" or "advanced". Just about any topic on which Dave Beazley has given a keynote talk

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 2:29 AM, Grant Edwards wrote: > If you assume TCP read/write operations are atomic and "message" > boundaries are preserved, your code is wrong. It will eventually > fail. Period. Indeed. That said, though, if your writes are all smaller than one packet, and you perfectl

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Skip Montanaro
On Fri, May 29, 2015 at 11:11 AM, Ned Deily wrote: > Well, she could just download a current Python 2.7.x for OS X from > python.org, install it, and see if that solves the problem. That would > be likely the easiest thing to do and is unlikely to make matters worse. > Might that appear to work

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

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 2:39 AM, Skip Montanaro wrote: > On Fri, May 29, 2015 at 11:01 AM, Mike Driscoll wrote: >> ... I was wondering what the community considers to be "intermediate" or >> "advanced". > > Just about any topic on which Dave Beazley has given a keynote talk. :-) Hehe. First hit

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

2015-05-29 Thread Mike Driscoll
On Friday, May 29, 2015 at 11:08:19 AM UTC-5, Joel Goldstick wrote: > Maybe itertools or generators > Yeah, I was thinking along those lines. I was also thinking about some of the cool stuff in the collections and contextlib modules. Mike -- https://mail.python.org/mailman/listinfo/python-list

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

2015-05-29 Thread Mike Driscoll
> > Good fun! A few ideas: > > How to write decorators, particularly those that take parameters. Yes, this one always seems to trip people up. > > The differences between the various number types (int, float, complex, > Fraction, Decimal) and when you'd want each one. I hadn't considered t

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Grant Edwards
On 2015-05-29, Chris Angelico wrote: > On Sat, May 30, 2015 at 2:29 AM, Grant Edwards > wrote: > >> If you assume TCP read/write operations are atomic and "message" >> boundaries are preserved, your code is wrong. It will eventually >> fail. Period. > > Indeed. That said, though, if your write

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

2015-05-29 Thread Mike Driscoll
On Friday, May 29, 2015 at 11:40:11 AM UTC-5, Skip Montanaro wrote: > On Fri, May 29, 2015 at 11:01 AM, Mike Driscoll wrote: > > ... I was wondering what the community considers to be "intermediate" or > > "advanced". > > Just about any topic on which Dave Beazley has given a keynote talk. :-) >

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

2015-05-29 Thread Todd
On Fri, May 29, 2015 at 7:02 PM, Todd wrote: > On Fri, May 29, 2015 at 6:01 PM, Mike Driscoll wrote: > >> Hi, >> >> 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 "advanc

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

2015-05-29 Thread Todd
On Fri, May 29, 2015 at 6:01 PM, Mike Driscoll wrote: > Hi, > > 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 wit

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

2015-05-29 Thread sohcahtoa82
On Friday, May 29, 2015 at 9:02:06 AM UTC-7, Mike Driscoll wrote: > Hi, > > 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 ab

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

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 2:57 AM, Mike Driscoll wrote: >> >> Good fun! A few ideas: >> >> How to write decorators, particularly those that take parameters. > > Yes, this one always seems to trip people up. It's like a Sherlock Holmes pronouncement. When you see something like Flask's app.route(),

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

2015-05-29 Thread Ethan Furman
On 05/29/2015 10:03 AM, sohcahto...@gmail.com wrote: On Friday, May 29, 2015 at 9:02:06 AM UTC-7, 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 "adv

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Marko Rauhamaa
Chris Angelico : > Indeed. That said, though, if your writes are all smaller than one > packet, and you perfectly alternate a write and a read, a write and a > read, at both ends, then you can go a very long way without ever > running into this. Rare errors are worse than consistent errors. TCP

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

2015-05-29 Thread Marko Rauhamaa
sohcahto...@gmail.com: > Metaclasses. > > I've read about them. I still don't understand them, why you would > want them, and what you gain from them. I don't think you would ever want them. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article , Skip Montanaro wrote: > On Fri, May 29, 2015 at 11:11 AM, Ned Deily wrote: > > > Well, she could just download a current Python 2.7.x for OS X from > > python.org, install it, and see if that solves the problem. That would > > be likely the easiest thing to do and is unlikely to

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread MrJean1
FWIW, I recently upgraded an older MacBook to Mac OS X 10.7.5 and there are 3 different versions of Python in /System/Library/Frameworks/Python.framework, see: $ ls /System/Library/Frameworks/Python.framework/Versions/ 2.5 2.6 2.7 Current It is unclear whether MacOS X 10.7.5 instal

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

2015-05-29 Thread Steven D'Aprano
On Sat, 30 May 2015 02:01 am, Mike Driscoll wrote: > Hi, > > 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 t

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Ned Deily
In article , MrJean1 wrote: > FWIW, I recently upgraded an older MacBook to Mac OS X 10.7.5 and there are 3 > different versions of Python in /System/Library/Frameworks/Python.framework, > see: > > $ ls /System/Library/Frameworks/Python.framework/Versions/ > 2.5 2.6 2.7 Current > >

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Paul Rubin
Chris Angelico writes: > Looks to me as if Lua doesn't have integers at all They fixed that in Lua 5.3: http://www.lua.org/manual/5.3/readme.html#changes > Likewise, eight-bit strings, not Unicode. Also fixed in 5.3 (basic utf-8 support added, per above). -- https://mail.python.org/mailman

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Paul Rubin
Chris Angelico writes: >> It doesn't add much to your application to embed Lua > Lua's a much weaker language than Python is, though. Can it handle > arbitrary-precision integers? Unicode? Dare I even ask, > arbitrary-precision rationals (fractions.Fraction)? Security comes at > a price, I guess.

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread MrJean1
Correct, the "Current" version is just a link to "2.7". Also, the binaries '/usr/bin/python{,w}" seem to be copies of the "/System/Library/.../Versions/2.7/bin/python{,w}" files. /Jean On Friday, May 29, 2015 at 2:01:05 PM UTC-4, Ned Deily wrote: > In article , > MrJean1 wrote: > > FWIW, I

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Marko Rauhamaa
Paul Rubin : > The language features are an orthogonal issue to embeddability. I doubt that. Guile is designed for embedding but it is a full-fledged Scheme implementation. > Lua is easier to embed securely because its embedding interface was > designed for that. I have very little experience w

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread random832
On Fri, May 29, 2015, at 12:11, Ned Deily wrote: > As others > have noted, running third-party apps like CleanMyMac is probably not a > good idea, but, even if it is as crappy as its sounds, I would think it > unlikely that it would be fooling with the Apple-supplied system Python > in /System/

Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-05-29 Thread Laura Creighton
Good news, we are getting closer to understanding what to do. This in from Ned. I will continue after the message: --- Forwarded Message Return-Path: From: Ned Deily Subject: Re: Fixing Python install on the Mac after running 'CleanMyMac' Date: Fri, 29 May 2015 10:28:19 -0700 Lines: 63 >

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Paul Rubin
Marko Rauhamaa writes: >> The language features are an orthogonal issue to embeddability. > I doubt that. Guile is designed for embedding but it is a full-fledged > Scheme implementation. Orthogonal means independent, not opposing. > I have very little experience with Lua. What surprises me is t

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

2015-05-29 Thread Mike Driscoll
Hi Steven, On Friday, May 29, 2015 at 12:55:48 PM UTC-5, Steven D'Aprano wrote: > On Sat, 30 May 2015 02:01 am, Mike Driscoll wrote: > > > Hi, > > > > I've been asked on several occasions to write about intermediate or > > advanced topics in Python and I was wondering what the community consider

Generating list of unique search sub-phrases

2015-05-29 Thread Nick Mellor
Hi all, My own solution works but I'm sure it could be simpler or read better. How would you do it? Say you've got a list of companies: Aerosonde Ltd Amcor ANCA Austal Ships Australia Post Australian Air Express Australian Defence Industries Australian Railroad Group Australian Submarine Corpor

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

2015-05-29 Thread sohcahtoa82
On Friday, May 29, 2015 at 10:18:29 AM UTC-7, Ethan Furman wrote: > On 05/29/2015 10:03 AM, sohcahto...@gmail.com wrote: > > On Friday, May 29, 2015 at 9:02:06 AM UTC-7, Mike Driscoll wrote: > > >> I've been asked on several occasions to write about intermediate or > >> advanced topics > >> in P

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

2015-05-29 Thread Jason Swails
On Fri, May 29, 2015 at 5:06 PM, wrote: > > > For example, the new (in 3.4) Enum class uses a metaclass. > > > >class SomeEnum(Enum): > > first = 1 > > second = 2 > > third = 3 > > > > The metaclass changes normal class behavior to: > > > >- support iterating: list(SomeE

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

2015-05-29 Thread Ethan Furman
On 05/29/2015 02:06 PM, sohcahto...@gmail.com wrote: On Friday, May 29, 2015 at 10:18:29 AM UTC-7, Ethan Furman wrote: Metaclasses change the way a class behaves. For example, the new (in 3.4) Enum class uses a metaclass. class SomeEnum(Enum): first = 1 second = 2 thi

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

2015-05-29 Thread Ethan Furman
On 05/29/2015 02:28 PM, Jason Swails wrote: ​[...] e.g., if the person creating an Enum subclass didn't bother to correctly implement [...] __iter__, and __len__ for their subclass For __iter__ and __len__ to work on the Enum /class/ it must be defined in the metaclass. -- ~Ethan~ -- https:/

functools.wraps does not play nice with doc tests?

2015-05-29 Thread Vlad
Hello, So, I know this topic comes up a lot, but I haven't been able to find any discussion on this particular twist on the topic. Perhaps someone has some insight. So, I have a function, which is decorated. In order for the doctest test finder to find the doc tests in the decorated function,

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 4:33 AM, Paul Rubin wrote: > Chris Angelico writes: >> Looks to me as if Lua doesn't have integers at all > > They fixed that in Lua 5.3: > > http://www.lua.org/manual/5.3/readme.html#changes That's 64-bit integers, not arbitrary-precision, but that's something at least

Re: Generating list of unique search sub-phrases

2015-05-29 Thread Peter Otten
Nick Mellor wrote: > Hi all, > > My own solution works but I'm sure it could be simpler or read better. How > would you do it? > > Say you've got a list of companies: > > Aerosonde Ltd > Amcor > ANCA > Austal Ships > Australia Post > Australian Air Express > Australian Defence Industries > Aust

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

2015-05-29 Thread M Philbrook
In article <3794b$55678d83$5419aafe$56...@news.ziggo.nl>, skybuck2000 @hotmail.com says... > > Hello, > > I was just coding and ran into a little logic problem which is as follows: > > There are two booleans/variables which can be either false or true. > > The desired thrutle table is: > > A =

Re: How to do integers to binary lists and back

2015-05-29 Thread John Pote
On 21/05/2015 23:31, MRAB wrote: On 2015-05-21 23:20, John Pote wrote: Hi everyone. I recently had the problem of converting from an integer to its representation as a list of binary bits, each bit being an integer 1 or 0, and vice versa. E.G. 0x53 becomes [ 0, 1, 0, 1, 0, 0, 1, 1 ] This I wa

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Paul Rubin
Chris Angelico writes: > Do you see what I mean about functionality being sacrificed for > security? No I don't. Lua has less functionality because it was designed to have a small embedding footprint. Python is much bigger because it was mostly designed to run as a standalone interpreter. Tha

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 11:28 AM, Paul Rubin wrote: > Chris Angelico writes: >> Do you see what I mean about functionality being sacrificed for >> security? > > No I don't. Lua has less functionality because it was designed to have > a small embedding footprint. Python is much bigger because it

Re: Creating a reliable sandboxed Python environment

2015-05-29 Thread Paul Rubin
Chris Angelico writes: > You can *easily* sandbox something that has very little functionality > - all you have to do is provide a minimalist "language" that permits > only a very few actions, and you know it's safe. But that security > comes at a price. This is a non-sequitur. The reason they d

Re: stdout of child process as an input of another thread in Python?

2015-05-29 Thread dieter
Kevin Peterson writes: > I want to use the stdout of child process as an input of another thread, but > some how I am not able to read the stdout. Using Popen I have created a > child process and stdout of it I have redirected to PIPE (because I don't > want that to be printed on with my main